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

Ensure admins have team-owner level access to all views in frontend #991

Merged
merged 4 commits into from
Sep 15, 2022

Conversation

knolleary
Copy link
Member

@knolleary knolleary commented Sep 15, 2022

Part of #940

(includes #987)

This takes advantage of how roles are defined in forge/lib/roles.js

const Roles = {
    None: 0,
    Member: 30,
    Owner: 50,
    Admin: 99
}

Rather than check role === Roles.Owner || role === Roles.Admin we can more concisely do role >= Roles.Owner.

@knolleary knolleary mentioned this pull request Sep 15, 2022
Copy link
Contributor

@hardillb hardillb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to look up what Teleport did, but the rest looks good.

@hardillb hardillb merged commit 653afa5 into main Sep 15, 2022
@hardillb hardillb deleted the admin-team-access-rbac-check branch September 15, 2022 13:04
@knolleary knolleary mentioned this pull request Sep 15, 2022
3 tasks
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

Successfully merging this pull request may close these issues.

None yet

2 participants