Fontend handling of account role to hide user actions and links that the user does not have access to
This commit is contained in:
1 parent
aa261bbe23
commit
1cff564483
5 files changed
+23
-22
No files matched your search
@@ -70,6 +70,7 @@ func RoleAuth(roles ...m.RoleType) macaron.Handler {
|
||||
func Auth(options *AuthOptions) macaron.Handler {
|
||||
return func(c *Context) {
|
||||
if !c.IsGrafanaAdmin && options.ReqGrafanaAdmin {
|
||||
c.SetCookie("redirect_to", url.QueryEscape(setting.AppSubUrl+c.Req.RequestURI), 0, setting.AppSubUrl+"/")
|
||||
authDenied(c)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user