mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 20:47:22 +00:00
fix: search usergrants if no resourceowner query (#2579)
This commit is contained in:
parent
a4127278e7
commit
802fbf175b
@ -56,9 +56,9 @@ func SearchUserGrants(db *gorm.DB, table string, req *grant_model.UserGrantSearc
|
||||
}
|
||||
}
|
||||
|
||||
if withGranted {
|
||||
if orgID != "" && withGranted {
|
||||
db = db.Where("resource_owner = ? OR project_owner = ?", orgID, orgID)
|
||||
} else {
|
||||
} else if orgID != "" {
|
||||
db = db.Where("resource_owner = ?", orgID)
|
||||
}
|
||||
query := repository.PrepareSearchQuery(table, model.UserGrantSearchRequest{Limit: req.Limit, Offset: req.Offset, Queries: req.Queries})
|
||||
|
Loading…
x
Reference in New Issue
Block a user