-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feat: Refactor for Project Role assignments for Team #820
Conversation
@TomerHeber @sagydr Do we need a non-patch upgrade here? |
@razbensimon - the plan should remain the same. Is there a way to test it? I can do a new major version if it makes sense. WDYT? |
if we can do it with a
EDIT: |
TeamProjectAssignmentCreateOrUpdate(payload *TeamProjectAssignmentPayload) (*TeamProjectAssignment, error) | ||
TeamProjectAssignmentDelete(projectId string, teamId string) error |
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.
I think "api_client" should have only 3 methods, that serve all scopes for team
(and additional 3 methods for users
).
the methods are the upsert / remove / get assignments - corresponding to the API.
So each method will get the scopeId
as an argument (aka environmentId
, projectId
, or organizationId
. They are optional and only one of them should exist).
That's because all of those are the same API and routes.
meaning TeamProjectAssignmentCreateOrUpdate
and TeamProjectAssignmentDelete
should be removed. And we should not "drag" / keep the existence of the old deprecated APIs names.
WDYS?
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.
the only scopes we haven't refactored yet - should preserve their methods here. Until we will refactor them too.
that's include:
- org level user assignments
- project level user assignments
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.
will be done in a follow-up PR.
As discussed on Slack. Only concern is if someone had mistakenly applied multiple assignments on the same project and team. (Not supported in the UI). |
Solution
Part of #817. Will create another PR for refactoring the API.