mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 23:23:10 +08:00
Chore: Move team models to models pkg (#61262)
* Chore: Move team models to models pkg * Fix ACL tests * More ACL tests * Change Id to ID in conflict user command test * Remove team from models * Fix ac test lint
This commit is contained in:
@ -223,12 +223,13 @@ func OrgAdminDashOrFolderAdminOrTeamAdmin(ss db.DB, ds dashboards.DashboardServi
|
||||
return
|
||||
}
|
||||
|
||||
isAdminOfTeamsQuery := models.IsAdminOfTeamsQuery{SignedInUser: c.SignedInUser}
|
||||
if err := ts.IsAdminOfTeams(c.Req.Context(), &isAdminOfTeamsQuery); err != nil {
|
||||
isAdminOfTeamsQuery := team.IsAdminOfTeamsQuery{SignedInUser: c.SignedInUser}
|
||||
isAdminOfTeamsQueryResult, err := ts.IsAdminOfTeams(c.Req.Context(), &isAdminOfTeamsQuery)
|
||||
if err != nil {
|
||||
c.JsonApiErr(500, "Failed to check if user is a team admin", err)
|
||||
}
|
||||
|
||||
if isAdminOfTeamsQuery.Result {
|
||||
if isAdminOfTeamsQueryResult {
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user