Auth Views¶
Source is located in the views, which
we’ll describe here.
Crudlfa+ PasswordView, Become and BecomeUser views.
Crudlfa+ takes views further than Django and are expected to:
generate their URL definitions and reversions,
check if a user has permission for an object,
declare the names of the navigation menus they belong to.
- class crudlfap_auth.views.Become(**kwargs)[source]¶
- has_perm()[source]¶
Called to decide if user has the permission to execute this view.
This is what you should override to code view level permission logic, unless you want to use a Django permission backend.
If unsure, you probably need to just define Router.has_perm.
Default behaviour:
return True if the view
authenticateattribute has been overridden to Falsereturn self.router.has_perm(self) if the view has a router
return self.has_perm_backend otherwise, to let a Django permission backend decide