Fix resource when call /projects/<project>#16380
Closed
orblazer wants to merge 1 commit intogoharbor:mainfrom
orblazer:patch-1
Closed
Fix resource when call /projects/<project>#16380orblazer wants to merge 1 commit intogoharbor:mainfrom orblazer:patch-1
orblazer wants to merge 1 commit intogoharbor:mainfrom
orblazer:patch-1
Conversation
Signed-off-by: orblazer <orblazer.minecraft@gmail.com>
|
Hi, we really need this to create some dashboards on our Backstage app using some information from each project. Any ETA to have this merged and added to a release? Thanks |
Member
Member
Vad1mo
approved these changes
Jun 2, 2022
Contributor
Contributor
Author
|
Hello @MinerYang, This PR is similar logic (fix "invalid" permissions on API) but that doesn't affect same urls. |
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
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.
Hello,
This PR fix resource when we call the root project url like
/projects/{project_name_or_id}.This is an update of #14753 because this issue is still present.
Affected issues : #14512
Affected endpoints :
Problem explanation
The bellowing code request resource
/project/*harbor/src/server/v2.0/handler/project.go
Line 324 in fd92efe
But this following line generate
/project/*/projectharbor/src/common/security/robot/context.go
Line 96 in fd92efe
Solution
So that PR fix that by creating custom case when we have request
projectresource and we haveprojectkind.Eg of permission enter in this case :
{ "access": [ { "action": "read", "resource": "project" } ], "kind": "project", "namespace": "*" }