Skip to content
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

resource project_member: fix role name => id mapping #33

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

clook
Copy link
Contributor

@clook clook commented Jul 22, 2020

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

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

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.

Got the source of truth from https://github.com/goharbor/harbor/blob/master/src/portal/src/app/shared/shared.const.ts

btw, "master" will be renamed to maintainer in a future release.
@nolte nolte merged commit 0ce330a into nolte:develop Jul 22, 2020
@nolte nolte added the bug An issue with the system. label Jul 22, 2020
@clook clook deleted the fix/resource-project-member-role-mapping branch July 23, 2020 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue with the system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants