Django Auth Decorator Processors¶
PermissionRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
PermissionRequiredDecoratorProcessor
¶ Process
@permission_required()
decorator on function based views.
LoginRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
LoginRequiredDecoratorProcessor
¶ Process
@login_required
decorator on function based views.
StaffMemberRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
StaffMemberRequiredDecoratorProcessor
¶ Process Django admin’s
@staff_member_required
decorator on function based views.
ActiveUserRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
ActiveUserRequiredDecoratorProcessor
¶ Process
@user_passes_test(lambda u: u.is_active)
decorator on function based views.
AnonymousUserRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
AnonymousUserRequiredDecoratorProcessor
¶ Process
@user_passes_test(lambda u: u.is_anonymous)
decorator on function based views.
SuperUserRequiredDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
SuperUserRequiredDecoratorProcessor
¶ Process
@user_passes_test(lambda u: u.is_superuser)
decorator on function based views.
UserPassesTestDecoratorProcessor¶
-
class
permissions_auditor.processors.auth_decorators.
UserPassesTestDecoratorProcessor
¶ Process
@user_passes_test()
decorator on function based views.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.