mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
Can get owner in getObject()
This commit is contained in:
parent
4c7f6fda37
commit
b832c304ae
@ -63,11 +63,16 @@ func getObject(ctx *context.Context) (string, string) {
|
|||||||
if method == http.MethodGet {
|
if method == http.MethodGet {
|
||||||
// query == "?id=built-in/admin"
|
// query == "?id=built-in/admin"
|
||||||
id := ctx.Input.Query("id")
|
id := ctx.Input.Query("id")
|
||||||
if id == "" {
|
if id != "" {
|
||||||
return "", ""
|
return util.GetOwnerAndNameFromId(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
return util.GetOwnerAndNameFromId(id)
|
owner := ctx.Input.Query("owner")
|
||||||
|
if owner != "" {
|
||||||
|
return owner, ""
|
||||||
|
}
|
||||||
|
|
||||||
|
return "", ""
|
||||||
} else {
|
} else {
|
||||||
body := ctx.Input.RequestBody
|
body := ctx.Input.RequestBody
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user