Skip to content

Commit

Permalink
MG-2516 - Fix listing users in domain (absmach#2526)
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
  • Loading branch information
nyagamunene authored Nov 13, 2024
1 parent 8b9ec40 commit 54a134e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions users/postgres/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,11 +628,6 @@ func PageQuery(pm users.Page) (string, error) {
if pm.Role != users.AllRole {
query = append(query, "u.role = :role")
}
// If there are search params presents, use search and ignore other options.
// Always combine role with search params, so len(query) > 1.
if len(query) > 1 {
return fmt.Sprintf("WHERE %s", strings.Join(query, " AND ")), nil
}

if mq != "" {
query = append(query, mq)
Expand Down

0 comments on commit 54a134e

Please sign in to comment.