vintasoftware / django-role-permissions

A django app for role based permissions.

Home Page:http://django-role-permissions.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HasPermissionsMixin no multiple permission support in required_permission

suryaajha opened this issue · comments

After going through some source I figured out that we are not supporting checking multiple permissions in required_permission of HasPermissionsMixin.
However, the name suggests it should support since it has plural "permissions" (maybe it's coming in the future?)
However we do support multiple roles checking in HasRoleMixin, It would be a great addition if we start supporting multiple permissions like Django permission_required attribute in PermissionRequiredMixin

Cool, that does makes sense. One caveat is to decide [and make clear to developers] on how it will work. Eg:

  • view requires permission1 AND permission2
  • view requires permission1 OR permission2