Make org roles explicit in membership#151
Merged
Merged
Conversation
9264e7c to
89c6fe9
Compare
ChrisPenner
commented
Sep 22, 2025
Comment on lines
51
to
57
| fetch "$transcripts_user" POST org-add-members '/orgs/acme/members' '{ | ||
| "members": [ | ||
| "test" | ||
| { "subject": "test", | ||
| "roles": "org_maintainer" | ||
| } | ||
| ] | ||
| }' |
Member
Author
There was a problem hiding this comment.
@hojberg Here's the new /orgs/<handle>/members POST format, subject is a user handle, roles in this case is a single role ref.
ChrisPenner
commented
Sep 22, 2025
Comment on lines
3
to
23
| "members": [ | ||
| { | ||
| "avatarUrl": null, | ||
| "handle": "newuser", | ||
| "name": null, | ||
| "userId": "U-<UUID>" | ||
| "roles": "org_maintainer", | ||
| "subject": { | ||
| "avatarUrl": null, | ||
| "handle": "test", | ||
| "name": null, | ||
| "userId": "U-<UUID>" | ||
| } | ||
| }, | ||
| { | ||
| "avatarUrl": null, | ||
| "handle": "test", | ||
| "name": null, | ||
| "userId": "U-<UUID>" | ||
| }, | ||
| { | ||
| "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", | ||
| "handle": "transcripts", | ||
| "name": "The Transcript User", | ||
| "userId": "U-<UUID>" | ||
| "roles": "org_owner", | ||
| "subject": { | ||
| "avatarUrl": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y&d=retro", | ||
| "handle": "transcripts", | ||
| "name": "The Transcript User", | ||
| "userId": "U-<UUID>" | ||
| } | ||
| } | ||
| ] | ||
| }, |
Member
Author
There was a problem hiding this comment.
Here's the new response for the 'members' endpoint, it includes the user's role.
Contributor
|
Frontend: unisoncomputing/share-ui#114 |
533744a to
ff3dc09
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
NOTE: requires co-ordination with frontend and a migration in order to deploy
Previously, org memberships and a user's role(s) within the org were separate concepts which added a lot of confusion and made the code tougher to understand.
Now each user's membership to an org includes a single role that they have within the org.
@hojberg
I believe you were previously using the org roles API, now all changes should go through the org members API, so see the new interfaces for the /members endpoints, I'll tag them in comments :)
Implementation notes
rolesendpoints on orgsTest coverage
New and existing transcripts