Auth: Org Invite and Team API SignedInUser interfacing (#73085)

* fix ngalert Evaluate sig change

* interface for teams and org invites

* Update pkg/api/org_invite.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
This commit is contained in:
Jo
2023-08-09 12:33:35 +02:00
committed by GitHub
co-authored by Ieva
parent 1343c74362
commit 5d8e6aa162
6 changed files with 134 additions and 53 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ func (ctx *ReqContext) writeErrOrFallback(status int, message string, err error)
}
func (ctx *ReqContext) HasUserRole(role org.RoleType) bool {
return ctx.OrgRole.Includes(role)
return ctx.SignedInUser.GetOrgRole().Includes(role)
}
func (ctx *ReqContext) HasHelpFlag(flag user.HelpFlags1) bool {