Add a warning of blocked server creation for adm's
This commit is contained in:
parent
726cc00c3c
commit
8a2d7b67f1
3 changed files with 10 additions and 5 deletions
|
@ -136,10 +136,8 @@ class ServerController extends Controller
|
|||
return redirect()->route('profile.index')->with('error', __("You are required to verify your email address before you can create a server."));
|
||||
}
|
||||
|
||||
/**
|
||||
* Required Verification for creating an server
|
||||
* Todo: Tell the administrator that server creation has been disabled?
|
||||
*/
|
||||
//Required Verification for creating an server
|
||||
|
||||
if (!config('SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS', 'true') && Auth::user()->role != "admin") {
|
||||
return redirect()->route('servers.index')->with('error', __("The system administrator has blocked the creation of new servers."));
|
||||
}
|
||||
|
|
|
@ -34,7 +34,12 @@
|
|||
<div class="card-title"><i class="fas fa-cogs mr-2"></i>{{ __('Server configuration') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!config("SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS"))
|
||||
<div class="alert alert-warning p-2 m-2">
|
||||
The creation of new servers has been disabled for regular users, enable it again
|
||||
<a href="{{route('admin.settings.system')}}">{{ __('here') }}</a>.
|
||||
</div>
|
||||
@endif
|
||||
@if ($productCount === 0 || $nodeCount === 0 || count($nests) === 0 || count($eggs) === 0)
|
||||
<div class="alert alert-danger p-2 m-2">
|
||||
<h5><i class="icon fas fa-exclamation-circle"></i>{{ __('Error!') }}</h5>
|
||||
|
|
|
@ -151,6 +151,8 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
|
|||
Route::get('settings/datatable', [SettingsController::class, 'datatable'])->name('settings.datatable');
|
||||
Route::patch('settings/updatevalue', [SettingsController::class, 'updatevalue'])->name('settings.updatevalue');
|
||||
Route::get("settings/checkPteroClientkey", [System::class, 'checkPteroClientkey'])->name('settings.checkPteroClientkey');
|
||||
Route::redirect("settings#system", "system")->name('settings.system');
|
||||
|
||||
#settings
|
||||
Route::patch('settings/update/invoice-settings', [Invoices::class, 'updateSettings'])->name('settings.update.invoicesettings');
|
||||
Route::patch('settings/update/language', [Language::class, 'updateSettings'])->name('settings.update.languagesettings');
|
||||
|
|
Loading…
Add table
Reference in a new issue