mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
feat: add forbidden check in SetPassword()
This commit is contained in:
parent
5e99007fc9
commit
88130bf020
@ -473,6 +473,11 @@ func (c *ApiController) SetPassword() {
|
||||
return
|
||||
}
|
||||
|
||||
if targetUser.IsForbidden || targetUser.IsDeleted {
|
||||
c.ResponseError(c.T("account:Failed to set password, the user is either forbidden or deleted"))
|
||||
return
|
||||
}
|
||||
|
||||
isAdmin := c.IsAdmin()
|
||||
if isAdmin {
|
||||
if oldPassword != "" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user