-
Notifications
You must be signed in to change notification settings - Fork 56
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
Conversation
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
- 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
vikasrohit
reviewed
Apr 27, 2020
vikasrohit
reviewed
Apr 27, 2020
vikasrohit
approved these changes
Apr 27, 2020
There was a problem hiding this 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.
When member is added directly "cancel" corresponding invite instead of "accept" it.
This was referenced Apr 28, 2020
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.
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
Refactored Create Project Member endpoint. Instead of imperative logic, the allowed project/topcoder roles associations are defined in a declarative way via constant PROJECT_TO_TOPCODER_ROLES_MATRIX
This matrix is added to be displayed in the permissions document https://htmlpreview.github.io/?https://github.com/topcoder-platform/tc-project-service/blob/feature/permissions/docs/permissions.html#roles-matrix
Fixes
Features
TODO
Don't return members in in
/projects
endpoints withoutread:projcet-members
M2M scopeIt 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.