Skip to content

fix invalid access action#16381

Closed
orblazer wants to merge 4 commits intogoharbor:mainfrom
orblazer:fix/access
Closed

fix invalid access action#16381
orblazer wants to merge 4 commits intogoharbor:mainfrom
orblazer:fix/access

Conversation

@orblazer
Copy link
Contributor

Hello,
This PR fix 2 invalid access action.

  • When we get repository via [GET]/projects/{project_name}/repositories/{repository_name} its ask list instead of read
  • When we list scanner candidates of project [GET]/projects/{project_name_or_id}/scanner/candidates its ask create instead of list

Thanks.

Signed-off-by: orblazer <orblazer.minecraft@gmail.com>
@codecov
Copy link

codecov bot commented Feb 19, 2022

Codecov Report

Merging #16381 (2228d2b) into main (c414666) will increase coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16381      +/-   ##
==========================================
+ Coverage   66.61%   66.64%   +0.03%     
==========================================
  Files         995      995              
  Lines      105886   105886              
  Branches     2600     2600              
==========================================
+ Hits        70532    70572      +40     
+ Misses      31461    31418      -43     
- Partials     3893     3896       +3     
Flag Coverage Δ
unittests 66.64% <0.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/server/v2.0/handler/repository.go 0.00% <0.00%> (ø)
src/core/api/internal.go 36.20% <0.00%> (-8.63%) ⬇️
src/jobservice/runner/redis.go 66.66% <0.00%> (-4.52%) ⬇️
...tegration/tag-retention/tag-retention.component.ts 36.75% <0.00%> (+5.98%) ⬆️
src/controller/event/topic.go 10.56% <0.00%> (+8.45%) ⬆️
src/pkg/permission/evaluator/rbac/casbin_match.go 100.00% <0.00%> (+10.86%) ⬆️
...g-retention-tasks/tag-retention-tasks.component.ts 86.11% <0.00%> (+25.00%) ⬆️
src/controller/event/handler/auditlog/auditlog.go 60.71% <0.00%> (+46.42%) ⬆️

@heww
Copy link
Contributor

heww commented Feb 22, 2022

Only project admin can access this API /projects/{project_name_or_id}/scanner/candidates, so it doesn't use the (scanner, read) permission.

@github-actions
Copy link

This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.

@MinerYang
Copy link
Contributor

MinerYang commented Jul 4, 2022

Hi @orblazer,
As it mentioned above, the repository part looks correct but not the scanner part.
Would you like to revise this PR?
Thanks!

@orblazer orblazer requested a review from a team as a code owner July 5, 2022 21:29
Copy link
Contributor

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@wy65701436 wy65701436 added the release-note/update Update or Fix label Jul 30, 2022
@wy65701436
Copy link
Contributor

@orblazer please help to resolve the coflict, then let me merge it, thanks.

Signed-off-by: orblazer <orblazer.minecraft@gmail.com>
@wy65701436 wy65701436 closed this Oct 17, 2022
@wy65701436 wy65701436 reopened this Oct 17, 2022
@wy65701436
Copy link
Contributor

@orblazer please help to sync the latest code to resolve the CI failure, then let me merge it, thanks.

Signed-off-by: orblazer <orblazer.minecraft@gmail.com>
@orblazer
Copy link
Contributor Author

Hello @wy65701436 i have merge the branch.
If you want the commit a7d86cf accept the DCO i can make new PR.

@wy65701436
Copy link
Contributor

@orblazer sure, you can go ahead to file an PR or fix the DCO of this one, the change LGTM

@wy65701436
Copy link
Contributor

@orblazer would you mind to resolve the DCO problem? then we can go ahead to merge it.

@orblazer orblazer mentioned this pull request Feb 8, 2023
5 tasks
@orblazer
Copy link
Contributor Author

orblazer commented Feb 8, 2023

Hello @wy65701436, as i have said, i have make new PR #18188 for accept DCO on original commit.

@orblazer orblazer closed this Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/update Update or Fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants