-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
have option to enable robot full access #20754
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #20754 +/- ##
==========================================
+ Coverage 45.36% 50.07% +4.71%
==========================================
Files 244 247 +3
Lines 13333 13782 +449
Branches 2719 2847 +128
==========================================
+ Hits 6049 6902 +853
+ Misses 6983 6799 -184
+ Partials 301 81 -220
Flags with carried forward coverage won't be shown. Click here to find out more. |
When the system admin enable this option, the robot can be assigned with robot/user/group/quota permissions. Signed-off-by: wang yan <[email protected]>
src/common/const.go
Outdated
@@ -246,4 +246,7 @@ const ( | |||
|
|||
// Global Leeway used for token validation | |||
JwtLeeway = 60 * time.Second | |||
|
|||
// Global Leeway used for token validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong comment?
src/common/rbac/const.go
Outdated
if config.RobotFullAccess(ctx) { | ||
permissionProvider = &NolimitProvider{} | ||
} | ||
return permissionProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if config.RobotFullAccess(ctx) {
return &NolimitProvider{}
}
return &BaseProvider{}
src/common/rbac/const.go
Outdated
var permissionProvider RobotPermissionProvider | ||
permissionProvider = &BaseProvider{} | ||
if config.RobotFullAccess(ctx) { | ||
permissionProvider = &NolimitProvider{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nolimit -> Unlimit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Signed-off-by: wang yan <[email protected]>
Signed-off-by: wang yan <[email protected]>
Signed-off-by: wang yan <[email protected]>
Signed-off-by: wang yan <[email protected]>
When the system admin enable this option, the robot can be assigned with robot/user/group/quota permissions.
Thank you for contributing to Harbor!
Comprehensive Summary of your change
Issue being fixed
Fixes #(issue)
Please indicate you've done the following: