mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
Deleted user cannot perform actions
This commit is contained in:
parent
93efaa5459
commit
f6a7888f83
@ -127,8 +127,14 @@ func IsAllowed(subOwner string, subName string, method string, urlPath string, o
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
if user != nil && user.IsAdmin && (subOwner == objOwner || (objOwner == "admin")) {
|
if user != nil {
|
||||||
return true
|
if user.IsDeleted {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if user.IsAdmin && (subOwner == objOwner || (objOwner == "admin")) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res, err := Enforcer.Enforce(subOwner, subName, method, urlPath, objOwner, objName)
|
res, err := Enforcer.Enforce(subOwner, subName, method, urlPath, objOwner, objName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user