mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
fix(auth proxy): Fix for server side rendering of panel when using auth proxy, fixes #2568
This commit is contained in:
parent
abd7c15ba8
commit
7072af7c14
@ -9,7 +9,7 @@ watch_dirs = [
|
|||||||
"$WORKDIR/public/views",
|
"$WORKDIR/public/views",
|
||||||
"$WORKDIR/conf",
|
"$WORKDIR/conf",
|
||||||
]
|
]
|
||||||
watch_exts = [".go", "conf/*"]
|
watch_exts = [".go", ".ini", ".toml"]
|
||||||
build_delay = 1500
|
build_delay = 1500
|
||||||
cmds = [
|
cmds = [
|
||||||
["go", "build", "-o", "./bin/grafana-server"],
|
["go", "build", "-o", "./bin/grafana-server"],
|
||||||
|
@ -10,6 +10,7 @@ it allows you to add queries of differnet data source types & instances to the s
|
|||||||
- [Issue #1186](https://github.com/grafana/grafana/issues/1186). Time Picker: New option `today`, will set time range from midnight to now
|
- [Issue #1186](https://github.com/grafana/grafana/issues/1186). Time Picker: New option `today`, will set time range from midnight to now
|
||||||
|
|
||||||
**Fixes**
|
**Fixes**
|
||||||
|
- [Issue #2568](https://github.com/grafana/grafana/issues/2568). AuthProxy: Fix for server side rendering of panel when using auth proxy
|
||||||
- [Issue #2490](https://github.com/grafana/grafana/issues/2490). Graphite: Dashboard import was broken in 2.1 and 2.1.1, working now
|
- [Issue #2490](https://github.com/grafana/grafana/issues/2490). Graphite: Dashboard import was broken in 2.1 and 2.1.1, working now
|
||||||
- [Issue #2565](https://github.com/grafana/grafana/issues/2565). TimePicker: Fix for when you applied custom time range it did not refreh dashboard
|
- [Issue #2565](https://github.com/grafana/grafana/issues/2565). TimePicker: Fix for when you applied custom time range it did not refreh dashboard
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package middleware
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/grafana/grafana/pkg/bus"
|
"github.com/grafana/grafana/pkg/bus"
|
||||||
|
"github.com/grafana/grafana/pkg/log"
|
||||||
m "github.com/grafana/grafana/pkg/models"
|
m "github.com/grafana/grafana/pkg/models"
|
||||||
"github.com/grafana/grafana/pkg/setting"
|
"github.com/grafana/grafana/pkg/setting"
|
||||||
)
|
)
|
||||||
@ -39,8 +40,16 @@ func initContextWithAuthProxy(ctx *Context) bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// initialize session
|
||||||
|
if err := ctx.Session.Start(ctx); err != nil {
|
||||||
|
log.Error(3, "Failed to start session", err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
ctx.SignedInUser = query.Result
|
ctx.SignedInUser = query.Result
|
||||||
ctx.IsSignedIn = true
|
ctx.IsSignedIn = true
|
||||||
|
ctx.Session.Set(SESS_KEY_USERID, ctx.UserId)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user