Skip to content

Support M2M and Unified permissions, part 1 #555

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 28, 2020
Merged

Conversation

maxceem
Copy link
Contributor

@maxceem maxceem commented Apr 26, 2020

Support of Standard M2M tokens (#483)

3 endpoints sets are supported:

  • /projects, scopes: all:projects, write:projects, read:projects
  • /projects/{id}/members, scopes: all:project-members, write:project-members, read:projcet-members
  • /projects/{id}/invites, scopes: all:project-members, write:project-members, read:projcet-members

Scope all:connect_project is supported for all endpoints for backward compatibility.

Unified Permissions (as per #346)

Roles Matrix

Fixes

  • Fixed "initiatorUserId" and "userId" fields in 'connect.notification.project.team.updated' event payload
  • Fix: don't allow to change project members Project Role if user doesn't have necessary Topcoder Roles. See how Program Manager which cannot join project as a Manager can still become Manager before this fix https://monosnap.com/file/SQ3nux0w9vKDsWcVYX6MSxW5Se5QKF
  • Fix: don't allow copilots to manage Topcoder Team project members

Features

  • Allow directly create member by M2M and for admins

TODO

  • Don't return members in in /projects endpoints without read:projcet-members M2M scope

  • It could be nice if the permissions which we now define in the Project Service regarding members and invites to apply in client side to make them absolutely in sync.

  • Add more unit tests for M2M. At the moment I've added only one essential test.

Maksym Mykhailenko added 7 commits April 26, 2020 11:06
- Support for M2M operation and using unified permissions for CRUD /projects/{id} and CRUD /projects/{id}/members endpoints
- Added script to generate Permissions Documentation
- Fixed "initiatorUserId" and "userId" fields in 'connect.notification.project.team.updated' event payload
- Allow directly create member by M2M and for admins
- Fix: don't allow to change project members roles if such user doesn't have necessary Topcoder Roles
- Fix: don't allow copilots to manage non-customer project members
-
For project members and project member invites
- Support for M2M operation and using unified permissions for CRUD /projects/{id}/invites endpoint
- "generalPermission" middleware supports several permissions
@maxceem maxceem requested a review from vikasrohit April 26, 2020 19:18
@maxceem maxceem changed the title [WIP] Support M2M and Unified permissions, part 1 Support M2M and Unified permissions, part 1 Apr 26, 2020
@maxceem maxceem marked this pull request as ready for review April 26, 2020 19:46
Copy link

@vikasrohit vikasrohit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except couple of notes.

@vikasrohit vikasrohit added this to the 2.4 milestone Apr 27, 2020
When member is added directly "cancel" corresponding invite instead of "accept" it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants