- Notifications
You must be signed in to change notification settings - Fork928
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
68a5b2b
toa4a986d
CompareEmyrk commentedJun 17, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This stack of pull requests is managed by Graphite.Learn more about stacking. |
47b1864
tobf3bfd0
Comparee488414
to909a7ce
CompareThere 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
toce367e5
Compare8e06ad4
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
coder organization members add <username | user_id>