Skip to content

Permissions handling #2841

@gondzo

Description

@gondzo

With the new user roles we have a lot of places to update regarding permission checks so the code for permission checks will be more and more complex inside containers/components, ex

made up example
if ((util.isManager(user) && !util.isAccountManager(user)) || util.isCopilot(user) || util.hasAdminRole(user)){...}

How about centralizing permission checks to a common module (or configuration file)?
For example we could have a single method for permission checks like
util.checkPermission(PERMISSIONS.EDIT_PROJECT_PLAN, user, entity) with entity parameter being the one we're checking the permission for (ex project, plan, phase, timeline, thread, etc)
What do you think @vikasrohit @maxceem @RishiRajSahu ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions