permissions
A wrapper for the GeoEngine permissions API.
RoleId Objects
Section titled “RoleId Objects”class RoleId()A wrapper for a role id
from_response
Section titled “from_response”@classmethoddef from_response(cls, response: dict[str, str]) -> RoleIdParse a http response to an RoleId
__eq__
Section titled “__eq__”def __eq__(other) -> boolChecks if two role ids are equal
Role Objects
Section titled “Role Objects”class Role()A wrapper for a role
__init__
Section titled “__init__”def __init__(role_id: UUID | RoleId | str, role_name: str)Create a role with name and id
from_response
Section titled “from_response”@classmethoddef from_response(cls, response: geoengine_api_client.models.role.Role) -> RoleParse a http response to an RoleId
__eq__
Section titled “__eq__”def __eq__(other) -> boolChecks if two role ids are equal
role_id
Section titled “role_id”def role_id() -> RoleIdget the role id
UserId Objects
Section titled “UserId Objects”class UserId()A wrapper for a role id
from_response
Section titled “from_response”@classmethoddef from_response(cls, response: dict[str, str]) -> UserIdParse a http response to an UserId
__eq__
Section titled “__eq__”def __eq__(other) -> boolChecks if two role ids are equal
PermissionListing Objects
Section titled “PermissionListing Objects”class PermissionListing()PermissionListing
__init__
Section titled “__init__”def __init__(permission: Permission, resource: Resource, role: Role)Create a PermissionListing
from_response
Section titled “from_response”@classmethoddef from_response( cls, response: geoengine_api_client.models.PermissionListing) -> PermissionListingTransforms a response PermissionListing to a PermissionListing
__eq__
Section titled “__eq__”def __eq__(other) -> boolChecks if two listings are equal
Permission Objects
Section titled “Permission Objects”class Permission(str, Enum)A permission
to_api_dict
Section titled “to_api_dict”def to_api_dict() -> geoengine_api_client.PermissionConvert to a dict for the API
add_permission
Section titled “add_permission”def add_permission(role: RoleId, resource: Resource, permission: Permission, timeout: int = 60)Add a permission to a resource for a role. Requires admin role.
remove_permission
Section titled “remove_permission”def remove_permission(role: RoleId, resource: Resource, permission: Permission, timeout: int = 60)Removes a permission to a resource from a role. Requires admin role.
list_permissions
Section titled “list_permissions”def list_permissions(resource: Resource, timeout: int = 60, offset=0, limit=20) -> list[PermissionListing]Lists the roles and permissions assigned to a ressource
add_role
Section titled “add_role”def add_role(name: str, timeout: int = 60) -> RoleIdAdd a new role. Requires admin role.
remove_role
Section titled “remove_role”def remove_role(role: RoleId, timeout: int = 60)Remove a role. Requires admin role.
assign_role
Section titled “assign_role”def assign_role(role: RoleId, user: UserId, timeout: int = 60)Assign a role to a user. Requires admin role.
revoke_role
Section titled “revoke_role”def revoke_role(role: RoleId, user: UserId, timeout: int = 60)Assign a role to a user. Requires admin role.