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
Refactor license and OAuth settings to redirect non-admin users to home page
Andras Bacsai25b0c8e35452
diff --git a/app/Livewire/Settings/License.php b/app/Livewire/Settings/License.phpindex ca0c9c1ae3..8cb7aad8f6 100644--- a/app/Livewire/Settings/License.php+++ b/app/Livewire/Settings/License.php@@ -28,6 +28,9 @@ class License extends Componentif (! isCloud()) {abort(404);}+ if (! isInstanceAdmin()) {+ return redirect()->route('home');+ }$this->instance_id = config('app.id');$this->settings = instanceSettings();}diff --git a/app/Livewire/SettingsOauth.php b/app/Livewire/SettingsOauth.phpindex c3884589f6..17b3b89a3b 100644--- a/app/Livewire/SettingsOauth.php+++ b/app/Livewire/SettingsOauth.php@@ -24,6 +24,9 @@ class SettingsOauth extends Componentpublic function mount(){+ if (! isInstanceAdmin()) {+ return redirect()->route('home');+ }$this->oauth_settings_map = OauthSetting::all()->sortBy('provider')->reduce(function ($carry, $setting) {$carry[$setting->provider] = $setting;