Commit 649fe7e4 by Daniel Lee

Merge branch 'v4.4.x'

parents d285045f 0d253573
......@@ -18,3 +18,5 @@ package_cloud push grafana/testing/el/7 grafana-${version}-1.x86_64.rpm
package_cloud push grafana/stable/el/7 grafana-${version}-1.x86_64.rpm
package_cloud push grafana/stable/el/6 grafana-${version}-1.x86_64.rpm
rm grafana*.{deb,rpm}
......@@ -13,3 +13,4 @@ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-${rpm_v
package_cloud push grafana/testing/el/6 grafana-${rpm_ver}.x86_64.rpm
package_cloud push grafana/testing/el/7 grafana-${rpm_ver}.x86_64.rpm
rm grafana*.{deb,rpm}
......@@ -143,6 +143,7 @@ func loginUserWithUser(user *m.User, c *middleware.Context) {
c.SetSuperSecureCookie(user.Rands+user.Password, setting.CookieRememberName, user.Login, days, setting.AppSubUrl+"/")
}
c.Session.RegenerateId(c)
c.Session.Set(middleware.SESS_KEY_USERID, user.Id)
}
......
......@@ -106,6 +106,10 @@ func (s *mockSession) Destory(c *Context) error {
return nil
}
func (s *mockSession) RegenerateId(c *Context) error {
return nil
}
type mockLdapAuthenticator struct {
syncSignedInUserCalled bool
}
......
......@@ -103,6 +103,8 @@ type SessionStore interface {
Destory(*Context) error
// init
Start(*Context) error
// RegenerateId regenerates the session id
RegenerateId(*Context) error
}
type SessionWrapper struct {
......@@ -116,6 +118,12 @@ func (s *SessionWrapper) Start(c *Context) error {
return err
}
func (s *SessionWrapper) RegenerateId(c *Context) error {
var err error
s.session, err = s.manager.RegenerateId(c.Context)
return err
}
func (s *SessionWrapper) Set(k interface{}, v interface{}) error {
if s.session != nil {
return s.session.Set(k, v)
......
......@@ -214,12 +214,8 @@ export class KeybindingSrv {
if (popups.length > 0) {
return;
}
// close modals
var modalData = $(".modal").data();
if (modalData && modalData.$scope && modalData.$scope.dismiss) {
modalData.$scope.dismiss();
}
scope.appEvent('hide-modal');
scope.appEvent('hide-dash-editor');
scope.appEvent('panel-change-view', {fullscreen: false, edit: false});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment