Skip to content

Limit the number of permission check methods Hypha uses for views #3351

Description

@frjo

Here are the different methods:

  1. Decorators like login_required, permission_required, staff_required
  2. Mixins like UserPassesTestMixin
  3. has_permission function
  4. Checks directly in a views dispatch function

Could not the 4 items be quite easily replaced by 2?

Things like permissions to delete a model I think should use permission_required. Then each organisation can configure the permissions for each group as they see fit.

The goal is to make the permissions as easy as possible to understand and test.

What is the best way forward?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EnhancementThis is an improvement of an existing thing (not a new thing, which would be a feature).

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions