Closed Bug 1216794 Opened 9 years ago Closed 8 years ago

Extend API to list groups for each user

Categories

(Participation Infrastructure :: Phonebook, enhancement)

2016-3.3
enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jonasfj, Assigned: nemo-yiannis)

Details

It would be nice to be able to get a list of curated groups (or all groups) that
a user is a member,

I'm just starting to use the awesome v2 API, for authentication of
community members. When people login with persona, I lookup their user with:
  https://mozillians.org/api/v2/users/?email=...

Then I have a list of curated group that I check for memberships of using:
  https://mozillians.org/api/v2/users/?email=...&group=...

However, it's one request per group of interest. At the moment I only care
about two groups, so it's absolutely not a problem. But in some future I might
interested in more groups.

I link groups to taskcluster roles which grants taskcluster scopes. And I
then issue temporary taskcluster credentials to authenticated users.
So more group memberships may give more scopes...

I think this will be a really good flow for community members to access
Mozilla automation infrastructure (primarily taskcluster).

Anyways, just something to consider next time someone feels like improving
the API. It works perfectly fine for me now, I just do more requests that
needed. And it'll be a long time before I have a long list groups to consider.
Commits pushed to master at https://github.com/mozilla/mozillians

https://github.com/mozilla/mozillians/commit/ff1be140e135c0eef2d231aac20b5864bcf97db5
[Fix bug 1216794] Expose group list in api UserProfileViewSet.

https://github.com/mozilla/mozillians/commit/082f95425deb12973171357c6caf33501e2ff7dc
Merge pull request #1321 from johngian/1216794-groups-list

[Fix bug 1216794] Expose group list in api UserProfileViewSet.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Version: other → next
Assignee: nobody → jgiannelos
Verified on stage that when querying for a specific Mozillian, the list of groups that the user is member is listed as well.
Status: RESOLVED → VERIFIED
Version: next → 2016-3.3
You need to log in before you can comment on or make changes to this bug.