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

feat: add hidden enterprise cmd command to list roles #13303

Merged
merged 4 commits into from
May 21, 2024

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented May 16, 2024

Usage

Listing roles has an --output=json to see the granular permissions

$ coder roles show
NAME            DISPLAY NAME    SITE PERMISSIONS  ORG PERMISSIONS  USER PERMISSIONS  ASSIGNABLE  BUILT IN  
auditor         Auditor         8 permissions     0 organizations  8 permissions     true        true      
owner           Owner           33 permissions    0 organizations  33 permissions    true        true      
template-admin  Template Admin  16 permissions    0 organizations  16 permissions    true        true      
user-admin      User Admin      17 permissions    0 organizations  17 permissions    true        true 

You can filter the returned roles, coder roles show owner auditor

Copy link
Member Author

Emyrk commented May 16, 2024

@Emyrk Emyrk force-pushed the stevenmasley/custom_role_cli_show branch from 35db80f to 086ce69 Compare May 16, 2024 21:16
@Emyrk Emyrk force-pushed the stevenmasley/custom_role_cli_show branch 2 times, most recently from 8cbfed1 to e0a2af8 Compare May 16, 2024 21:55
@Emyrk Emyrk requested a review from mtojek May 16, 2024 22:09
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

LGTM, left few comments but nothing blocking 👍

coderd/database/dbauthz/dbauthz_test.go Show resolved Hide resolved
coderd/database/dbmem/dbmem.go Outdated Show resolved Hide resolved
enterprise/coderd/roles.go Show resolved Hide resolved
enterprise/cli/rolescmd.go Show resolved Hide resolved
Emyrk added 3 commits May 21, 2024 08:00
This includes custom roles, and has a json ouput option for
more granular permissions
@Emyrk Emyrk force-pushed the stevenmasley/custom_role_cli_show branch from c5d8ba0 to 5f83fc4 Compare May 21, 2024 18:01
@Emyrk Emyrk merged commit c61b64b into main May 21, 2024
36 checks passed
@Emyrk Emyrk deleted the stevenmasley/custom_role_cli_show branch May 21, 2024 18:14
@github-actions github-actions bot locked and limited conversation to collaborators May 21, 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.

None yet

2 participants