resource project_member: fix role name => id mapping #33
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.
Description
Fix the mapping "role name" to "role id" for the
project_member
resource.Got the source of truth from https://github.com/goharbor/harbor/blob/master/src/portal/src/app/shared/shared.const.ts
btw, the role "master" will be renamed to "maintainer" in a future release.
Acceptance tests
Documentation
N/A
References
https://github.com/goharbor/harbor/blob/master/src/portal/src/app/shared/shared.const.ts
Community Note
Currently, I don't know how to maintain this mapping other than manually and watching to Harbor source code. It is documented (but not up to date) in the description of the
roleId
integer field but there is no reference structure for this mapping.Without a source of truth given as parsable reference from Harbor, we cannot have any test to guaranty the mapping is not broken.