care.security.authorization.organization module

class OrganizationAccess

Bases: AuthorizationHandler

can_create_organization_obj(user, organization)

Check if the user has permission to create organizations under the given organization

can_manage_organization_obj(user, organization)

Check if the user has permission to manage given organization.

check_role_subset(user, organization_parents, requested_role)

Check if the requested role is a subset of user’s roles in an organization

can_manage_organization_users_obj(user, organization, requested_role)

Check if the user has permission to create organizations under the given organization

can_list_organization_users_obj(user, organization)

Check if the user has permission to create organizations under the given organization

can_delete_organization(user, organization)

Check if the user has permission to delete the given organization

get_accessible_organizations(qs, user)
get_permission_on_organization(organization, user)