Skip to content

support robot to list project#15431

Merged
wy65701436 merged 1 commit intogoharbor:masterfrom
wy65701436:robot-replication
Aug 17, 2021
Merged

support robot to list project#15431
wy65701436 merged 1 commit intogoharbor:masterfrom
wy65701436:robot-replication

Conversation

@wy65701436
Copy link
Contributor

1, add permission check for API of List Project
2, use the self defined query to handle both names and public query

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

@codecov
Copy link

codecov bot commented Aug 15, 2021

Codecov Report

Merging #15431 (64aacff) into master (eabff82) will decrease coverage by 0.01%.
The diff coverage is 22.72%.

❗ Current head 64aacff differs from pull request most recent head e2b6a3c. Consider uploading reports for the commit e2b6a3c to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15431      +/-   ##
==========================================
- Coverage   66.79%   66.78%   -0.02%     
==========================================
  Files         927      927              
  Lines       76017    76046      +29     
  Branches     2248     2248              
==========================================
+ Hits        50779    50784       +5     
- Misses      21309    21337      +28     
+ Partials     3929     3925       -4     
Flag Coverage Δ
unittests 66.78% <22.72%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
src/pkg/project/models/project.go 48.75% <0.00%> (-7.78%) ⬇️
src/server/middleware/security/robot.go 34.48% <0.00%> (+7.45%) ⬆️
src/server/v2.0/handler/project.go 6.20% <0.00%> (-0.20%) ⬇️
src/server/v2.0/handler/repository.go 0.00% <0.00%> (ø)
src/common/security/robot/context.go 62.79% <76.92%> (+1.67%) ⬆️
...es/vulnerability/vulnerability-config.component.ts 47.00% <0.00%> (-5.99%) ⬇️
src/jobservice/runner/redis.go 68.68% <0.00%> (+4.04%) ⬆️
src/lib/cache/util.go 89.47% <0.00%> (+15.78%) ⬆️

@wy65701436 wy65701436 force-pushed the robot-replication branch 3 times, most recently from 64aacff to 50c5e26 Compare August 17, 2021 01:45
1, add permission check for API of List Projects
2, add permission check for API of List Repositories
3, use the self defined query to handle both names and public query

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

var names []string
for _, v := range query.Names {
names = append(names, `'`+v+`'`)
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest using the lib/pg.QuoteLiteral here

@wy65701436 wy65701436 merged commit 14f7274 into goharbor:master Aug 17, 2021
yunkunrao pushed a commit to yunkunrao/harbor that referenced this pull request Aug 19, 2021
1, add permission check for API of List Projects
2, add permission check for API of List Repositories
3, use the self defined query to handle both names and public query

Signed-off-by: wang yan <wangyan@vmware.com>
prahaladdarkin pushed a commit to prahaladdarkin/harbor that referenced this pull request Aug 25, 2021
1, add permission check for API of List Projects
2, add permission check for API of List Repositories
3, use the self defined query to handle both names and public query

Signed-off-by: wang yan <wangyan@vmware.com>
lindhe pushed a commit to lindhe/harbor that referenced this pull request Sep 22, 2021
1, add permission check for API of List Projects
2, add permission check for API of List Repositories
3, use the self defined query to handle both names and public query

Signed-off-by: wang yan <wangyan@vmware.com>
Signed-off-by: Andreas Lindhé <andreas@lindhe.io>
prahaladdarkin pushed a commit to prahaladdarkin/harbor that referenced this pull request Nov 12, 2021
1, add permission check for API of List Projects
2, add permission check for API of List Repositories
3, use the self defined query to handle both names and public query

Signed-off-by: wang yan <wangyan@vmware.com>
prahaladdarkin pushed a commit to prahaladdarkin/harbor that referenced this pull request Mar 13, 2022
1, add permission check for API of List Projects
2, add permission check for API of List Repositories
3, use the self defined query to handle both names and public query

Signed-off-by: wang yan <wangyan@vmware.com>
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.

3 participants