Skip to content

improve RequirePermission component #385

Closed
coder/coder
#16661
@aslilac

Description

@aslilac

Right now it just takes a boolean and redirects you to /dashboard if it's false. Not very helpful.

I think it'd be more helpful if we transformed this into a component like <Loader /> or <ErrorAlert />, something to be rendered when a user is missing permission to view a specific resource.

There are several places, especially in the organizations UI, that this could be used.

OrganizationSettingsPage.tsx is a good example of a page that should be showing a permission error, but is currently doing something worse/confusing. This could be a good test bed for developing the new component.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions