ferrosoft.apps.ferrobase.auth package¶
Submodules¶
ferrosoft.apps.ferrobase.auth.roles module¶
- class ferrosoft.apps.ferrobase.auth.roles.PermissionSet(group, permissions=<factory>)[source]¶
Bases:
objectAssociates a Django group name with a list of model-level permissions.
groupholds the display name of the DjangoGroupthis set maps to;permissionsaccumulates the individual Django permission strings.
- class ferrosoft.apps.ferrobase.auth.roles.Permissions[source]¶
Bases:
objectUtility for generating and checking Django permission strings.
Maps
Verbenum values to the corresponding Django CRUD verbs (add,view,change,delete) and assembles fully qualified<app_label>.<verb>_<model_name>permission strings.- classmethod allowed(request, model_class, verb)[source]¶
Check whether the current request user has the given permission.
- class ferrosoft.apps.ferrobase.auth.roles.Registry[source]¶
Bases:
objectStatic registry mapping each
Roleto itsPermissionSet.Provides the single source of truth for which Django permissions belong to each built-in role. The mapping is consumed when setting up tenant groups and when assigning roles to users.