Skip to content

chore: add built in organization roles to match site #13938

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

Merged
merged 5 commits into from
Jul 19, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jul 18, 2024

Added org user admin, org template admin, and org auditor

$ coder organizations roles show
NAME                         DISPLAY NAME                 SITE PERMISSIONS  ORGANIZATION PERMISSIONS  USER PERMISSIONS  
organization-admin           Organization Admin           0 permissions     33 permissions            0 permissions     
organization-auditor         Organization Auditor         0 permissions     1 permissions             0 permissions     
organization-template-admin  Organization Template Admin  0 permissions     10 permissions            0 permissions     
organization-user-admin      Organization User Admin      0 permissions     11 permissions            0 permissions 

Closes #13763

Added org user admin, org template admin, and org auditor
@Emyrk Emyrk marked this pull request as ready for review July 19, 2024 14:08
Comment on lines +453 to +457
Site: Permissions(map[string][]policy.Action{
// To assign organization members, we need to be able to read
// users at the site wide to know they exist.
ResourceUser.Type: {policy.ActionRead},
}),
Copy link
Member Author

Choose a reason for hiding this comment

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

This needs to be fixed by only needing the org member read permission. But ExtractUser is currently used in organization routes, where an org member should probably be sufficient.

Comment on lines +391 to +395
Site: Permissions(map[string][]policy.Action{
// To assign organization members, we need to be able to read
// users at the site wide to know they exist.
ResourceUser.Type: {policy.ActionRead},
}),
Copy link
Member Author

Choose a reason for hiding this comment

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

This is unfortunate, but to add a user to an org, we need to know that user exists.

@Emyrk Emyrk requested a review from f0ssel July 19, 2024 17:55
@Emyrk Emyrk merged commit 49d6d0f into main Jul 19, 2024
29 checks passed
@Emyrk Emyrk deleted the stevenmasley/builtin_org_roles branch July 19, 2024 20:44
@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2024
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.

Implement set of built in organizational roles
2 participants