mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 19:40:19 +08:00
fix: fix GetResources() bug for app users
This commit is contained in:
@ -52,12 +52,12 @@ func (c *ApiController) GetResources() {
|
||||
sortField := c.Input().Get("sortField")
|
||||
sortOrder := c.Input().Get("sortOrder")
|
||||
|
||||
userObj, ok := c.RequireSignedInUser()
|
||||
isOrgAdmin, ok := c.IsOrgAdmin()
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
if userObj != nil && userObj.IsAdmin {
|
||||
if isOrgAdmin {
|
||||
user = ""
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user