mirror of
https://github.com/casdoor/casdoor.git
synced 2025-09-09 00:52:56 +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" {
|
if path == "/api/delete-resource" {
|
||||||
tokens := strings.Split(obj.Name, "/")
|
tokens := strings.Split(obj.Name, "/")
|
||||||
if len(tokens) >= 2 {
|
if len(tokens) >= 5 {
|
||||||
obj.Name = tokens[len(tokens)-2]
|
obj.Name = tokens[4]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user