mirror of
https://github.com/goharbor/harbor
synced 2024-09-21 08:25:48 +00: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)
|
log.Errorf("failed to get user's project role: %v", err)
|
||||||
s.CustomAbort(http.StatusInternalServerError, "")
|
s.CustomAbort(http.StatusInternalServerError, "")
|
||||||
}
|
}
|
||||||
p.Role = roles[0].RoleID
|
if len(roles) != 0 {
|
||||||
|
p.Role = roles[0].RoleID
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.Role == models.PROJECTADMIN {
|
if p.Role == models.PROJECTADMIN {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user