mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
Allow deactivation of SSO users api3 (#8008)
This commit is contained in:
+9
-1
@@ -727,7 +727,15 @@ func updateActive(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if ruser, err := c.App.UpdateNonSSOUserActive(userId, active); err != nil {
|
||||
var ruser *model.User
|
||||
var err *model.AppError
|
||||
|
||||
if ruser, err = c.App.GetUser(userId); err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
|
||||
if _, err := c.App.UpdateActive(ruser, active); err != nil {
|
||||
c.Err = err
|
||||
} else {
|
||||
c.LogAuditWithUserId(ruser.Id, fmt.Sprintf("active=%v", active))
|
||||
|
||||
Reference in New Issue
Block a user