-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Labels
FrontendThis is a frontendThis is a frontendODHACK14good first issueGood for newcomersGood for newcomersonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week
Description
🔐 usePermissionCheck
Create usePermissionCheck Hook to Manage Role-Based UI Access
Description:
Develop a hook to check user permissions and return whether a certain action, component, or route should be accessible. Useful for conditionally rendering UI or protecting routes.
Why it's important:
Role-based access control (RBAC) is critical in multi-role applications. Centralizing the logic avoids repeated conditionals and keeps code cleaner.
Acceptance Criteria:
- Accepts user role(s) or permission list from context or props.
- Accepts required permission(s) or role(s) as input.
- Returns boolean or throws if unauthorized (configurable).
- Can be used inside components or guards (
<PrivateRoute>style).
Metadata
Metadata
Assignees
Labels
FrontendThis is a frontendThis is a frontendODHACK14good first issueGood for newcomersGood for newcomersonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week