PermLookupDict
This class provides a dictionary-like interface for checking a user's permissions within a specific application. It allows for boolean checks on module-level permissions and individual permission lookups via key access. Note that this class is explicitly non-iterable and will raise a TypeError if iteration is attempted.
Attributes
| Attribute | Type | Description |
|---|---|---|
| user | [User](../../models/user.md?sid=django_contrib_auth_models_user) | The user instance whose permissions are being queried by the lookup dictionary. |
| app_label | string | The application identifier used as a namespace prefix when checking for specific permissions. |
Constructor
Signature
def PermLookupDict(
user: object,
app_label: string
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| user | object | The user object whose permissions are being checked. |
| app_label | string | The label of the application for which permissions are being scoped. |