An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
chore: Update registration view to display a notice for first user that it will be an admin
Andras Bacsai0ce41d2c1ce2
diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.phpindex 9b0a81026b..53a2e9281d 100644--- a/app/Providers/FortifyServiceProvider.php+++ b/app/Providers/FortifyServiceProvider.php@@ -44,6 +44,8 @@ class FortifyServiceProvider extends ServiceProvider{Fortify::createUsersUsing(CreateNewUser::class);Fortify::registerView(function () {+ $isFirstUser = User::count() === 0;+$settings = \App\Models\InstanceSettings::get();if (! $settings->is_registration_enabled) {return redirect()->route('login');@@ -51,7 +53,9 @@ class FortifyServiceProvider extends ServiceProviderif (config('coolify.waitlist')) {return redirect()->route('waitlist.index');} else {- return view('auth.register');+ return view('auth.register', [+ 'isFirstUser' => $isFirstUser,+ ]);}});diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.phpindex 2976401116..1d236a6c4f 100644--- a/resources/views/auth/register.blade.php+++ b/resources/views/auth/register.blade.php@@ -16,9 +16,16 @@ $email = getOldOrLocal('email', '[email protected]');</a><div class="w-full bg-white rounded-lg shadow md:mt-0 sm:max-w-md xl:p-0 dark:bg-base"><div class="p-6 space-y-4 md:space-y-6 sm:p-8">- <h1 class="text-xl font-bold leading-tight tracking-tight text-gray-900 md:text-2xl dark:text-white">- Create an account- </h1>+ <div>+ <h1+ class="text-xl font-bold leading-tight tracking-tight text-gray-900 md:text-2xl dark:text-white">+ Create an account+ </h1>+ @if ($isFirstUser)+ <div class="text-xs dark:text-warning">This user will be the root user (full admin access).+ </div>+ @endif+ </div><form action="/register" method="POST" class="flex flex-col gap-2">@csrf<x-forms.input id="name" required type="text" name="name" value="{{ $name }}"