Allow deactivation of SSO users api3 (#8008)
Этот коммит содержится в:
10
api/user.go
10
api/user.go
@@ -727,7 +727,15 @@ func updateActive(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
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
|
c.Err = err
|
||||||
} else {
|
} else {
|
||||||
c.LogAuditWithUserId(ruser.Id, fmt.Sprintf("active=%v", active))
|
c.LogAuditWithUserId(ruser.Id, fmt.Sprintf("active=%v", active))
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user