mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Fix get-all-objects API 403 issue
This commit is contained in:
parent
b31a317585
commit
468ceb6b71
@ -92,6 +92,9 @@ p, *, *, GET, /api/get-plan, *, *
|
|||||||
p, *, *, GET, /api/get-subscription, *, *
|
p, *, *, GET, /api/get-subscription, *, *
|
||||||
p, *, *, GET, /api/get-provider, *, *
|
p, *, *, GET, /api/get-provider, *, *
|
||||||
p, *, *, GET, /api/get-organization-names, *, *
|
p, *, *, GET, /api/get-organization-names, *, *
|
||||||
|
p, *, *, GET, /api/get-all-objects, *, *
|
||||||
|
p, *, *, GET, /api/get-all-actions, *, *
|
||||||
|
p, *, *, GET, /api/get-all-roles, *, *
|
||||||
`
|
`
|
||||||
|
|
||||||
sa := stringadapter.NewAdapter(ruleText)
|
sa := stringadapter.NewAdapter(ruleText)
|
||||||
|
@ -271,6 +271,9 @@ func getRolesByUserInternal(userId string) ([]*Role, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return roles, err
|
return roles, err
|
||||||
}
|
}
|
||||||
|
if user == nil {
|
||||||
|
return nil, fmt.Errorf("The user: %s doesn't exist", userId)
|
||||||
|
}
|
||||||
|
|
||||||
query := ormer.Engine.Alias("r").Where("r.users like ?", fmt.Sprintf("%%%s%%", userId))
|
query := ormer.Engine.Alias("r").Where("r.users like ?", fmt.Sprintf("%%%s%%", userId))
|
||||||
for _, group := range user.Groups {
|
for _, group := range user.Groups {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user