mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-13 18:31:28 +01:00
Merge pull request #1630 from ywk253100/170316_fix_search_bug
Fix search bug
This commit is contained in:
commit
695c7041b8
@ -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