You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I was looking at docs about creating RBAC based routes, and I see that permission scopes are defined in multiple places rather than shared.
Example scenario - <Admin /> page that requires write:admin scope. The check happens in the beforeLoad of the route.
I have another route, not a child of <Admin />, open to all users that shown a list of links. For admins I want to show the link to the admin panel based on whether they have the write:admin scope.
I don't want to inline the scope in both checks as that may cause a drift in the future. What is the best way to share this scope information?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I was looking at docs about creating RBAC based routes, and I see that permission scopes are defined in multiple places rather than shared.
Example scenario -
<Admin />page that requireswrite:adminscope. The check happens in thebeforeLoadof the route.I have another route, not a child of
<Admin />, open to all users that shown a list of links. For admins I want to show the link to the admin panel based on whether they have thewrite:adminscope.I don't want to inline the scope in both checks as that may cause a drift in the future. What is the best way to share this scope information?
Beta Was this translation helpful? Give feedback.
All reactions