Browse Source

fix: query correction for role=creator to display active user list

Signed-off-by: dstala <sivadstala@gmail.com>
pull/524/head
dstala 3 years ago
parent
commit
76cc165434
  1. 2
      packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts

2
packages/nocodb/src/lib/noco/rest/RestAuthCtrl.ts

@ -1150,7 +1150,7 @@ export default class RestAuthCtrl {
});
if (!req.session?.passport?.user?.roles?.owner) {
queryBuilder.whereNot('roles', 'like', '%owner%')
queryBuilder.whereNot('nc_projects_users.roles', 'like', '%owner%')
count = (await this.users.count('id as count').whereNot('roles', 'like', '%owner%').first()).count;
} else {
count = (await this.users.count('id as count').where('email', 'like', `%${query}%`).first()).count;

Loading…
Cancel
Save