projectal.entities.permission API documentation

# projectal.entities.permission

View Source

     1from projectal.entity import Entity
     2from projectal.linkers import *
     3from projectal import api
     4
     5
     6class Permission(Entity, UserLinker, AccessPolicyLinker):
     7    """
     8    Implementation of the [Permission](https://projectal.com/docs/latest/#tag/Permission) API.
     9    """
    10
    11    _path = "permission"
    12    _name = "permission"
    13    _links_reverse = [UserLinker, AccessPolicyLinker]
    14
    15    @classmethod
    16    def list(cls):
    17        url = "/api/permission/list?start=0&limit=-1"
    18        response = api.get(url)
    19        perms = {}
    20        for perm in response:
    21            perms[perm["name"]] = Permission(perm)
    22        return perms

class Permission(projectal.entity.Entity, projectal.linkers.UserLinker, projectal.linkers.AccessPolicyLinker): View Source

     7class Permission(Entity, UserLinker, AccessPolicyLinker):
     8    """
     9    Implementation of the [Permission](https://projectal.com/docs/latest/#tag/Permission) API.
    10    """
    11
    12    _path = "permission"
    13    _name = "permission"
    14    _links_reverse = [UserLinker, AccessPolicyLinker]
    15
    16    @classmethod
    17    def list(cls):
    18        url = "/api/permission/list?start=0&limit=-1"
    19        response = api.get(url)
    20        perms = {}
    21        for perm in response:
    22            perms[perm["name"]] = Permission(perm)
    23        return perms

Implementation of the Permission API.

@classmethod
def list(cls): View Source

    16    @classmethod
    17    def list(cls):
    18        url = "/api/permission/list?start=0&limit=-1"
    19        response = api.get(url)
    20        perms = {}
    21        for perm in response:
    22            perms[perm["name"]] = Permission(perm)
    23        return perms

Return a list of all entity UUIDs of this type.

You may pass in `expand=True` to get full Entity objects instead, but be aware this may be very slow if you have thousands of objects.

If you are expanding the objects, you may further expand the results with `links`.

##### Inherited Members

projectal.entity.Entity
  get
  update
  delete
  history
  create
  save
  clone
  match
  match_startswith
  match_endswith
  match_one
  match_startswith_one
  match_endswith_one
  search
  query
  profile_get
  profile_set
  changes
  set_readonly
  get_link_definitions
  entity_name
projectal.linkers.UserLinker
  link_user
  unlink_user
projectal.linkers.AccessPolicyLinker
  link_access_policy
  unlink_access_policy