Skip to content

Commit

Permalink
include roles rather than eq roles
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Jan 8, 2024
1 parent a119034 commit 76dba6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/backend/bancho.py/server/admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class AdminProvider extends Base<Id> implements Base<Id> {
query.safeName ? eq(schema.users.safeName, query.safeName) : undefined,
query.email ? eq(schema.users.email, query.email) : undefined,
query.flag ? eq(schema.users.country, query.flag) : undefined,
query.roles?.length ? eq(schema.users.priv, toBanchoPyPriv(query.roles)) : undefined,
query.roles?.length ? sql`${schema.users.priv} & ${toBanchoPyPriv(query.roles)} = ${toBanchoPyPriv(query.roles)}` : undefined,
].filter(TSFilter)
const baseQuery = this.drizzle.select({
user: pick(schema.users, ['id', 'name', 'safeName', 'priv', 'country', 'email', 'preferredMode', 'lastActivity', 'creationTime']),
Expand Down

0 comments on commit 76dba6c

Please sign in to comment.