1
0
Fork 0
mirror of synced 2024-05-20 12:42:39 +12:00

Fixed count method

This commit is contained in:
Eldad Fux 2021-02-23 14:52:14 +02:00
parent cdf54fd19c
commit db898d9f9c
3 changed files with 7 additions and 2 deletions

View file

@ -64,12 +64,13 @@ App::post('/v1/account')
$whitlistDomains = $project->getAttribute('authWhitelistDomains');
if($whitlistGod !== 'disabled') {
$sum = $projectDB->getCount([ // Count users
'limit' => 1,
$projectDB->getCollection([ // Count users
'filters' => [
'$collection='.Database::SYSTEM_COLLECTION_USERS,
],
]);
$sum = $projectDB->getSum();
if($sum !== 0) {
throw new Exception('Console registration is restricted. Contact your administrator for more information.', 401);

View file

@ -56,6 +56,7 @@ services:
- influxdb
environment:
- _APP_ENV
- _APP_CONSOLE_WHITELIST_GOD
- _APP_CONSOLE_WHITELIST_EMAILS
- _APP_CONSOLE_WHITELIST_IPS
- _APP_SYSTEM_EMAIL_NAME

View file

@ -75,6 +75,9 @@ services:
- influxdb
environment:
- _APP_ENV
- _APP_CONSOLE_WHITELIST_GOD
- _APP_CONSOLE_WHITELIST_EMAILS
- _APP_CONSOLE_WHITELIST_IPS
- _APP_SYSTEM_EMAIL_NAME
- _APP_SYSTEM_EMAIL_ADDRESS
- _APP_SYSTEM_SECURITY_EMAIL_ADDRESS