Chore: Remove x from team (#47905)

* Chore: Remove x from team

* Update pkg/services/sqlstore/team.go

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>

* Update pkg/services/sqlstore/team.go

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>

* Refactor dialects and add ISAdminOfTeams to Store

* Add IsAdminOfTeams to mockstore

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
This commit is contained in:
Kat Yang
2022-04-20 15:11:37 -04:00
committed by GitHub
co-authored by ying-jeanne
parent 72b5af8d9b
commit 68478e908a
5 changed files with 161 additions and 148 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ func OrgAdminFolderAdminOrTeamAdmin(ss sqlstore.Store) func(c *models.ReqContext
}
isAdminOfTeamsQuery := models.IsAdminOfTeamsQuery{SignedInUser: c.SignedInUser}
if err := sqlstore.IsAdminOfTeams(c.Req.Context(), &isAdminOfTeamsQuery); err != nil {
if err := ss.IsAdminOfTeams(c.Req.Context(), &isAdminOfTeamsQuery); err != nil {
c.JsonApiErr(500, "Failed to check if user is a team admin", err)
}