Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,6 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

# Whether or not to automatically register new users upon first login
#SAML2_AUTO_REGISTER_NEW_USERS=false

# Should normal user allowed to create projects
# USER_CREATE_PROJECTS = false
2 changes: 1 addition & 1 deletion app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function userPageContent(): JsonResponse
$response['user_is_admin'] = $user->admin;
$response['show_monitor'] = config('queue.default') === 'database';

if ($config->get('CDASH_USER_CREATE_PROJECTS')) {
if (boolval(config('cdash.user_create_projects'))) {
$response['user_can_create_projects'] = 1;
} else {
$response['user_can_create_projects'] = 0;
Expand Down
2 changes: 1 addition & 1 deletion app/cdash/app/Model/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@ public function ConvertToJSON(\App\Models\User $user): array
}
$response['name_encoded'] = urlencode($this->Name ?? '');

$includeQuota = !$config->get('CDASH_USER_CREATE_PROJECTS') || $user->IsAdmin();
$includeQuota = !boolval(config('cdash.user_create_projects')) || $user->IsAdmin();

if ($includeQuota) {
$uploadQuotaGB = 0;
Expand Down
2 changes: 0 additions & 2 deletions app/cdash/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
$CDASH_LOG_FILE = $CDASH_LOG_DIRECTORY . '/cdash.log';
// Upload directory (absolute or relative)
$CDASH_UPLOAD_DIRECTORY = $CDASH_ROOT_DIR . '/public/upload';
// Should normal user allowed to create projects
$CDASH_USER_CREATE_PROJECTS = false;
// Request full email address to add new users
// instead of displaying a list
$CDASH_FULL_EMAIL_WHEN_ADDING_USER = '0';
Expand Down