Skip to content

Conversation

Kira-Pilot
Copy link
Member

resolves #4704

We've added a new hook, useReadPagePermissions to determine if a user has permissions to view a certain page. This hook can be used in tandem with our existing RequirePermission component such that a user without permissions is redirected to /workspaces.

Note: we did have a pre-existing hook, usePermissions that loads all the permissions we query for in our authMachine; however, I added this secondary hook for more fine-grained control. It is nice to have individual pages load their own permissions, and certain resources are permissioned by ID.

For now, I've added redirects to the /workspace page and to the /audit page. If you notice other places in the app that need them, let me know!

Kapture 2023-03-24 at 14 44 02

@Kira-Pilot Kira-Pilot merged commit fc21e15 into main Mar 27, 2023
@Kira-Pilot Kira-Pilot deleted the redirect-to-workspaces/kira-pilot branch March 27, 2023 13:25
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource not found or you do not have access to this resource
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy