-
Notifications
You must be signed in to change notification settings - Fork 881
chore: add organization member api + cli #13577
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
Conversation
68a5b2b
to
a4a986d
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
47b1864
to
bf3bfd0
Compare
* docs: add screenshots page * fmt
e488414
to
909a7ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:+1, nothing blocking
r.Use( | ||
// Adding a member requires "read" permission | ||
// on the site user. So limited to owners and user-admins. | ||
// TODO: Allow org-admins to add users via some new permission? Or give them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a future PR: I think a new permission would be nice here, I don't think it's intuitive for developers to know that a read permission on a site user grants them access to add new org members.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@f0ssel one option is just to not require the read permission to add a user, using the system context to fetch a user.
I agree it is not intuitive at present. Since orgs are still a ways out, I'm not spending too much time on these details atm.
func TestAddMember(t *testing.T) { | ||
t.Parallel() | ||
|
||
t.Run("OK", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think testing to error cases like missing user and org 404, etc for posterity could be good as well
909a7ce
to
ce367e5
Compare
coder organization members add <username | user_id>