Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DashboardLayout] Add roles to navigation #4490

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bharatkashyap
Copy link
Member

  • Closes [core] Support RBAC in AppProvider #4120
  • Add a roles: string[] to NavigationPageItem
  • Add groups?: string[] and roles?: string[] to Session
  • Check if user.groups or user.roles has a matching role in hasMatchingRole
  • Remove pages from navigation and render a 404 on navigation to pages for which there is no access
  • Remains agnostic to the method of providing the roles or groups on the session object

@bharatkashyap bharatkashyap added the new feature New feature or request label Nov 28, 2024
@Janpot
Copy link
Member

Janpot commented Nov 28, 2024

I'm hesitant building anything RBAC before we have the CRUD features and have set up a pro version.

instead I think we could add a way to disable items through a callback, just like how it's done with treeview or datagrid. that way it and other use cases can be built in userland. use cases which can be then used to validate an RFC.

@bharatkashyap
Copy link
Member Author

bharatkashyap commented Nov 28, 2024

I'm hesitant building anything RBAC before we have the CRUD features and have set up a pro version.

We discussed this week that given #4120 is the most upvoted (and fastest growing in upvotes) issue, does it make sense to keep a minimal version of the roles feature blocked till the entirety of CRUD has landed?

Once we have CRUD and the pro version, we can integrate the roles we define here with the ability to restrict some CRUD actions on some resources.

Wdyt?

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] Support RBAC in AppProvider
2 participants