cleanup, make sure users are always synced with ldap

This commit is contained in:
Dan Cech 2018-04-17 17:48:56 -04:00
parent 33760b5c3b
commit 3fedcb1e4b
No known key found for this signature in database
GPG Key ID: 6F1146C5B66FBD41
2 changed files with 3 additions and 6 deletions

View File

@ -68,12 +68,7 @@ func UpsertUser(cmd *m.UpsertUserCommand) error {
}
}
err = syncOrgRoles(cmd.Result, extUser)
if err != nil {
return err
}
return nil
return syncOrgRoles(cmd.Result, extUser)
}
func createUser(extUser *m.ExternalUserInfo) (*m.User, error) {

View File

@ -65,6 +65,8 @@ func initContextWithAuthProxy(ctx *m.ReqContext, orgID int64) bool {
query.UserId = getRequestUserId(ctx)
// if we're using ldap, pass authproxy login name to ldap user sync
} else if setting.LdapEnabled {
ctx.Session.Delete(session.SESS_KEY_LASTLDAPSYNC)
syncQuery := &m.LoginUserQuery{
ReqContext: ctx,
Username: proxyHeaderValue,