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

add permission validation for robot creating and updating. #19598

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

wy65701436
Copy link
Contributor

@wy65701436 wy65701436 commented Nov 20, 2023

It is not allowed to create an new robot with the access outside the predefined scope.

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #(issue)

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

Copy link

codecov bot commented Nov 20, 2023

Codecov Report

Merging #19598 (4450200) into main (43ccd2f) will increase coverage by 0.00%.
The diff coverage is 27.27%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #19598   +/-   ##
=======================================
  Coverage   67.52%   67.53%           
=======================================
  Files         991      991           
  Lines      109144   109166   +22     
  Branches     2719     2719           
=======================================
+ Hits        73701    73720   +19     
- Misses      31474    31475    +1     
- Partials     3969     3971    +2     
Flag Coverage Δ
unittests 67.53% <27.27%> (+<0.01%) ⬆️

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

Files Coverage Δ
src/server/v2.0/handler/robot.go 6.13% <27.27%> (+1.82%) ⬆️

... and 3 files with indirect coverage changes

@wy65701436 wy65701436 force-pushed the rb-full-api branch 2 times, most recently from 63221db to 9c66a0f Compare November 21, 2023 01:13
Copy link
Contributor

@AllForNothing AllForNothing 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 force-pushed the rb-full-api branch 3 times, most recently from a67af91 to 0d14b00 Compare November 22, 2023 03:16
wy65701436 and others added 2 commits November 22, 2023 11:16
It is not allowed to create an new robot with the access outside the predefined scope.

Signed-off-by: wang yan <wangyan@vmware.com>
1. Fix robot testcase
2. update robot permission metadata

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
Signed-off-by: wang yan <wangyan@vmware.com>
@AllForNothing AllForNothing merged commit 062d144 into goharbor:main Nov 22, 2023
11 of 12 checks passed
altynbaev pushed a commit to altynbaev/harbor that referenced this pull request Jan 29, 2024
…19598)

* add permission validation for robot creating and updating.

It is not allowed to create an new robot with the access outside the predefined scope.

Signed-off-by: wang yan <wangyan@vmware.com>

* Fix robot testcase and update robot permission metadata (goharbor#167)

1. Fix robot testcase
2. update robot permission metadata

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
Signed-off-by: wang yan <wangyan@vmware.com>

---------

Signed-off-by: wang yan <wangyan@vmware.com>
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
Co-authored-by: Yang Jiao <72076317+YangJiao0817@users.noreply.github.com>
Signed-off-by: Altynbaev Dinislam <altynbayevdr@sberautotech.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants