mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Fix delete-resource authz check.
This commit is contained in:
@ -84,8 +84,8 @@ func getObject(ctx *context.Context) (string, string) {
|
||||
|
||||
if path == "/api/delete-resource" {
|
||||
tokens := strings.Split(obj.Name, "/")
|
||||
if len(tokens) >= 2 {
|
||||
obj.Name = tokens[len(tokens)-2]
|
||||
if len(tokens) >= 5 {
|
||||
obj.Name = tokens[4]
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user