care.security.authorization.facilityorganization module

class FacilityOrganizationAccess

Bases: AuthorizationHandler

check_role_subset(user, organization_parents, requested_role)

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

can_create_facility_organization_obj(user, organization, facility)

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

can_manage_facility_organization_obj(user, organization)

Check if the user has permission to manage given organization.

can_delete_facility_organization(user, organization)

Check if the user has permission to delete the given organization

get_accessible_facility_organizations(qs, user, facility)
can_list_facility_organization_users_obj(user, organization)

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

can_manage_facility_organization_users_obj(user, organization, requested_role)

Check if the user has permission manage users in the given organization

get_permission_on_facility_organization(organization, user)