mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fontend handling of account role to hide user actions and links that the user does not have access to
This commit is contained in:
@@ -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