topcoder-platform / groups-api

v5 groups api
0 stars 15 forks source link

Groups API getGroup and updateGroup aren't working for inactive groups with M2M #56

Open rootelement opened 4 years ago

rootelement commented 4 years ago

These calls should allow an M2M with the right scopes to act just as an admin can.

https://github.com/topcoder-platform/groups-api/blob/2711917f60198e7553abe5f8f04bed59d464faed/src/services/GroupService.js#L263

https://github.com/topcoder-platform/groups-api/blob/2711917f60198e7553abe5f8f04bed59d464faed/src/services/GroupService.js#L323

I believe the update is: currentUser === 'M2M' || helper.hasAdminRole(currentUser)

But please confirm and test.

cc @cwdcwd

rootelement commented 4 years ago

FYI - i don't think this has really ever been an issue for anyone else because I'm bringing legacy groups forward with a script and I was creating them as inactive, so i couldn't find them afterward.

bountyC0d3r commented 4 years ago

by design the group update was only done by the admin only and not by the m2m

rootelement commented 4 years ago

Ok, i'll conceed the Update part. But the GET won't allow an M2M to get Inactive groups?

bountyC0d3r commented 4 years ago

@rootelement I made changes where you can get the inactive groups in getGroups call