mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-18 21:01:27 +01:00
Merge pull request #1630 from ywk253100/170316_fix_search_bug
Fix search bug
This commit is contained in:
commit
695c7041b8
@ -86,8 +86,10 @@ func (s *SearchAPI) Get() {
|
||||
log.Errorf("failed to get user's project role: %v", err)
|
||||
s.CustomAbort(http.StatusInternalServerError, "")
|
||||
}
|
||||
if len(roles) != 0 {
|
||||
p.Role = roles[0].RoleID
|
||||
}
|
||||
}
|
||||
|
||||
if p.Role == models.PROJECTADMIN {
|
||||
p.Togglable = true
|
||||
|
Loading…
Reference in New Issue
Block a user