Allow a user to see membership details of another user on sites where they have 'view.roster' permission

Description

A user can visit a site and if they have 'view.roster' permission, they can check whether User X is a member however, they cannot make an entity broker call to /direct/memberships and do the same thing.

That is to say, a call like /direct/membership.json?userId=251734fc-7107-4f34-80e4-6093e4ee9afa always returns a 403 forbidden for a non 'admin' user.

It should return a list of sites (membership_collection) that User X belongs to where the current user has view.roster (I think) access, or an empty membership_collection.

This only works for the admin user at the moment, who can see all memberships

Activity

Show:

Matthew Buckett November 16, 2018 at 4:39 AM

Yep, your right Sam, I've opened https://sakaiproject.atlassian.net/browse/SAK-40943#icft=SAK-40943 to address this.

Sam Ottenhoff November 15, 2018 at 3:49 PM

Is it fair to say that this change regressed previous behavior where a student's call to /direct/memberships would at least show their own (Student role) memberships? It seems like the requirement for view.roster permissions means a student can no longer view their own sites.

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Created June 27, 2017 at 10:25 AM
Updated November 16, 2018 at 4:39 AM
Resolved July 3, 2017 at 6:32 AM

Flag notifications