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

Allow requirePermission with extendend features #651

Closed
BeepLoveKarki opened this issue Jan 13, 2021 · 1 comment
Closed

Allow requirePermission with extendend features #651

BeepLoveKarki opened this issue Jan 13, 2021 · 1 comment
Milestone

Comments

@BeepLoveKarki
Copy link
Contributor

Having requirepermission in a way that it can allow all to view that tab except the ones we want, would be a great handy feature for the development of various scenarios.

We can reproduce this with basic algebric operations (or any other way you think).

For example,

requiresPermission: ! ("SuperAdmin")
requiresPermission: ("SuperAdmin") & ("A role")

@michaelbromley
Copy link
Member

Might be even more flexible to accept a predicate function so you can use whatever logic you like to decide whether to display the menu item. In that case I would probably make a distinct property like isVisible: () => boolean.

@michaelbromley michaelbromley added this to the v0.18.3 milestone Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants