mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Fix delete-resource authz check.
This commit is contained in:
parent
e7018e3de4
commit
37a26e2a91
@ -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]
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user