agency.security
Functions
|
Returns the current role of the identity. Elevates the role from member |
|
Global permission with elevated roles. |
|
Specific model permission with elevated roles for this model. |
|
|
|
|
|
|
|
|
|
|
|
|
Module Contents
- agency.security.get_current_role(session: sqlalchemy.orm.Session, identity: Identity | NoIdentity) str | None [source]
Returns the current role of the identity. Elevates the role from member to editor if any group role mapping with editor role is present.
- agency.security.has_permission(app: onegov.agency.AgencyApp, identity: morepath.authentication.Identity, model: object, permission: object) bool [source]
Global permission with elevated roles.
- agency.security.has_model_permission(app: onegov.agency.AgencyApp, identity: morepath.authentication.Identity, model: object, permission: object) bool [source]
Specific model permission with elevated roles for this model.
- agency.security.has_permission_all(app: onegov.agency.AgencyApp, identity: morepath.authentication.Identity, model: object, permission: object) bool [source]
- agency.security.has_permission_agency(app: onegov.agency.AgencyApp, identity: morepath.authentication.Identity, model: onegov.people.Agency, permission: object) bool [source]
- agency.security.has_permission_agency_membership(app: onegov.agency.AgencyApp, identity: morepath.authentication.Identity, model: onegov.people.AgencyMembership, permission: object) bool [source]
- agency.security.has_permission_person(app: onegov.agency.AgencyApp, identity: morepath.authentication.Identity, model: onegov.people.Person, permission: object) bool [source]
- agency.security.has_permission_agency_collection(app: onegov.agency.AgencyApp, identity: morepath.authentication.Identity, model: onegov.people.AgencyCollection, permission: object) bool [source]
- agency.security.has_permission_agency_move(app: onegov.agency.AgencyApp, identity: morepath.authentication.Identity, model: onegov.agency.models.AgencyMove, permission: object) bool [source]
- agency.security.has_permission_agency_membership_move_within_agency(app: onegov.agency.AgencyApp, identity: morepath.authentication.Identity, model: onegov.agency.models.AgencyMembershipMoveWithinAgency, permission: object) bool [source]
- agency.security.has_permission_agency_membership_move_within_person(app: onegov.agency.AgencyApp, identity: morepath.authentication.Identity, model: onegov.agency.models.AgencyMembershipMoveWithinPerson, permission: object) bool [source]