mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-14 14:25:36 +01:00
fix bug
This commit is contained in:
parent
746667bb38
commit
5c2bd7eecc
@ -302,7 +302,10 @@ func (p *ProjectAPI) List() {
|
||||
log.Errorf("failed to get user's project role: %v", err)
|
||||
p.CustomAbort(http.StatusInternalServerError, "")
|
||||
}
|
||||
projectList[i].Role = roles[0].RoleID
|
||||
if len(roles) != 0 {
|
||||
projectList[i].Role = roles[0].RoleID
|
||||
}
|
||||
|
||||
if projectList[i].Role == models.PROJECTADMIN ||
|
||||
isAdmin {
|
||||
projectList[i].Togglable = true
|
||||
|
Loading…
Reference in New Issue
Block a user