Django Auth Decorator Processors¶
PermissionRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
PermissionRequiredDecoratorProcessor
¶ Process
@permission_required()
decorator.
LoginRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
LoginRequiredDecoratorProcessor
¶ Process
@login_required
decorator.
StaffMemberRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
StaffMemberRequiredDecoratorProcessor
¶ Process Django admin’s
@staff_member_required
decorator.
ActiveUserRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
ActiveUserRequiredDecoratorProcessor
¶ Process
@user_passes_test(lambda u: u.is_active)
decorator.
AnonymousUserRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
AnonymousUserRequiredDecoratorProcessor
¶ Process
@user_passes_test(lambda u: u.is_anonymous)
decorator.
SuperUserRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
SuperUserRequiredDecoratorProcessor
¶ Process
@user_passes_test(lambda u: u.is_superuser)
decorator.
UserPassesTestDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
UserPassesTestDecoratorProcessor
¶ Process
@user_passes_test()
decorator.Note
the
@user_passes_test
decorator does not automatically check that the User is not anonymous. This means they don’t necessarily need to be authenticated for the check to pass, so this processor returnsNone
(unknown) for the login_required attribute.