feat(ui): add two step confirmation to enable self registration

This commit is contained in:
ShadowArcanist committed 2026-03-29 22:48:02 +05:30
1 parent 72118d61f9
commit 3a0cfeeab6
2 files changed
+39 -6

No files matched your search

+13
View File
@@ -157,6 +157,19 @@ class Advanced extends Component
}
}
public function toggleRegistration($password): bool
{
if (! verifyPasswordConfirmation($password, $this)) {
return false;
}
$this->settings->is_registration_enabled = $this->is_registration_enabled = true;
$this->settings->save();
$this->dispatch('success', 'Registration has been enabled.');
return true;
}
public function toggleTwoStepConfirmation($password): bool
{
if (! verifyPasswordConfirmation($password, $this)) {