mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:32:13 +08:00
teams: moved logic for searchteams to backend
This commit is contained in:

committed by
Leonard Gram

parent
782b5b6a3a
commit
b60e71c28b
@ -81,7 +81,7 @@ func DeleteTeamByID(c *m.ReqContext) Response {
|
||||
}
|
||||
|
||||
// GET /api/teams/search
|
||||
func SearchTeams(c *m.ReqContext) Response {
|
||||
func (hs *HTTPServer) SearchTeams(c *m.ReqContext) Response {
|
||||
perPage := c.QueryInt("perpage")
|
||||
if perPage <= 0 {
|
||||
perPage = 1000
|
||||
@ -92,7 +92,7 @@ func SearchTeams(c *m.ReqContext) Response {
|
||||
}
|
||||
|
||||
var userIdFilter int64
|
||||
if c.QueryBool("showMine") {
|
||||
if hs.Cfg.EditorsCanAdmin && c.OrgRole != m.ROLE_ADMIN {
|
||||
userIdFilter = c.SignedInUser.UserId
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user