mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
feat: add OAuth-only self-registration setting
This commit is contained in:
parent
4367595a9f
commit
5647c0a553
1 changed files with 30 additions and 0 deletions
30
app/Livewire/Settings/OauthRegistration.php
Normal file
30
app/Livewire/Settings/OauthRegistration.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Settings;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class OauthRegistration extends Component
|
||||
{
|
||||
public bool $is_oauth_registration_enabled = false;
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$settings = instanceSettings();
|
||||
$this->is_oauth_registration_enabled = (bool) $settings->is_oauth_registration_enabled;
|
||||
}
|
||||
|
||||
public function save()
|
||||
{
|
||||
$settings = instanceSettings();
|
||||
$settings->is_oauth_registration_enabled = $this->is_oauth_registration_enabled;
|
||||
$settings->save();
|
||||
|
||||
$this->dispatch('success', 'OAuth registration setting saved.');
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.settings.oauth-registration');
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue