fix: fix GetResources() bug for app users

This commit is contained in:
Yang Luo
2024-03-08 16:15:31 +08:00
parent 3527e070a0
commit 0d5f49e40a
2 changed files with 27 additions and 3 deletions

View File

@ -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 = ""
}