mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 00:57:44 +01:00
fix search bug
This commit is contained in:
parent
bd0d935bca
commit
20e764636b
@ -86,7 +86,9 @@ func (s *SearchAPI) Get() {
|
||||
log.Errorf("failed to get user's project role: %v", err)
|
||||
s.CustomAbort(http.StatusInternalServerError, "")
|
||||
}
|
||||
p.Role = roles[0].RoleID
|
||||
if len(roles) != 0 {
|
||||
p.Role = roles[0].RoleID
|
||||
}
|
||||
}
|
||||
|
||||
if p.Role == models.PROJECTADMIN {
|
||||
|
Loading…
Reference in New Issue
Block a user