mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-20 06:31:55 +01:00
Merge pull request #264 from ywk253100/sync_image
integrated with new API of project
This commit is contained in:
commit
bba7336674
@ -202,9 +202,14 @@ func (c *Checker) projectExist() (exist, canWrite bool, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
exist = true
|
||||
// TODO handle canWrite when new API is ready
|
||||
canWrite = true
|
||||
for _, project := range projects {
|
||||
if project.Name == c.project {
|
||||
exist = true
|
||||
canWrite = (project.Role == models.PROJECTADMIN ||
|
||||
project.Role == models.DEVELOPER)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user