Skip to content

Refactor has_access calls to accept permission lists instead of multiple or statements #86

Description

@bduke-dev

Update all instances where an or statement is used with has_access to instead pass a list for the sec_permission parameter. For example, refactor code from:

if has_access(request.user.id, auth_obj) or has_access(request.user.id, "scoutadmin"):
    ...

to:

if has_access(request.user.id, [auth_obj, "scoutadmin"]):
    ...

Ensure all such patterns in the codebase are updated for consistency and maintainability in the update-has-access branch.

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

    enhancementNew feature or request

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions