Fixed count method
This commit is contained in:
parent
cdf54fd19c
commit
db898d9f9c
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue