mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
disable actions
This commit is contained in:
@@ -18,21 +18,25 @@ class CreateNewUser implements CreatesNewUsers
|
|||||||
* Create a newly registered user.
|
* Create a newly registered user.
|
||||||
*
|
*
|
||||||
* @param array $input
|
* @param array $input
|
||||||
|
*
|
||||||
* @return \App\Models\User
|
* @return \App\Models\User
|
||||||
*/
|
*/
|
||||||
public function create(array $input)
|
public function create(array $input)
|
||||||
{
|
{
|
||||||
|
abort('404', 'WIP');
|
||||||
|
|
||||||
Validator::make($input, [
|
Validator::make($input, [
|
||||||
'name' => ['required', 'string', 'max:255'],
|
'name' => ['required', 'string', 'max:255'],
|
||||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||||
'password' => $this->passwordRules(),
|
'password' => $this->passwordRules(),
|
||||||
'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '',
|
'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['accepted', 'required'] : '',
|
||||||
])->validate();
|
])
|
||||||
|
->validate();
|
||||||
|
|
||||||
return DB::transaction(function () use ($input) {
|
return DB::transaction(function () use ($input) {
|
||||||
return tap(User::create([
|
return tap(User::create([
|
||||||
'name' => $input['name'],
|
'name' => $input['name'],
|
||||||
'email' => $input['email'],
|
'email' => $input['email'],
|
||||||
'password' => Hash::make($input['password']),
|
'password' => Hash::make($input['password']),
|
||||||
]), function (User $user) {
|
]), function (User $user) {
|
||||||
$this->createTeam($user);
|
$this->createTeam($user);
|
||||||
@@ -44,14 +48,16 @@ class CreateNewUser implements CreatesNewUsers
|
|||||||
* Create a personal team for the user.
|
* Create a personal team for the user.
|
||||||
*
|
*
|
||||||
* @param \App\Models\User $user
|
* @param \App\Models\User $user
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function createTeam(User $user)
|
protected function createTeam(User $user)
|
||||||
{
|
{
|
||||||
$user->ownedTeams()->save(Team::forceCreate([
|
$user->ownedTeams()
|
||||||
'user_id' => $user->id,
|
->save(Team::forceCreate([
|
||||||
'name' => explode(' ', $user->name, 2)[0]."'s Team",
|
'user_id' => $user->id,
|
||||||
'personal_team' => true,
|
'name' => explode(' ', $user->name, 2)[0]."'s Team",
|
||||||
]));
|
'personal_team' => true,
|
||||||
|
]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,12 +19,14 @@
|
|||||||
<x-jet-label for="email" value="{{ __('Email') }}"/>
|
<x-jet-label for="email" value="{{ __('Email') }}"/>
|
||||||
<x-jet-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')"
|
<x-jet-input id="email" class="block mt-1 w-full" type="email" name="email" :value="old('email')"
|
||||||
required autofocus/>
|
required autofocus/>
|
||||||
|
admin@einundzwanzig.space
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<x-jet-label for="password" value="{{ __('Password') }}"/>
|
<x-jet-label for="password" value="{{ __('Password') }}"/>
|
||||||
<x-jet-input id="password" class="block mt-1 w-full" type="password" name="password" required
|
<x-jet-input id="password" class="block mt-1 w-full" type="password" name="password" required
|
||||||
autocomplete="current-password"/>
|
autocomplete="current-password"/>
|
||||||
|
1234
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="block mt-4">
|
<div class="block mt-4">
|
||||||
|
|||||||
@@ -43,9 +43,9 @@
|
|||||||
{{ __('Cancel') }}
|
{{ __('Cancel') }}
|
||||||
</x-jet-secondary-button>
|
</x-jet-secondary-button>
|
||||||
|
|
||||||
<x-jet-danger-button class="ml-3" wire:click="deleteUser" wire:loading.attr="disabled">
|
{{--<x-jet-danger-button class="ml-3" wire:click="deleteUser" wire:loading.attr="disabled">
|
||||||
{{ __('Delete Account') }}
|
{{ __('Delete Account') }}
|
||||||
</x-jet-danger-button>
|
</x-jet-danger-button>--}}
|
||||||
</x-slot>
|
</x-slot>
|
||||||
</x-jet-dialog-modal>
|
</x-jet-dialog-modal>
|
||||||
</x-slot>
|
</x-slot>
|
||||||
|
|||||||
@@ -86,11 +86,11 @@
|
|||||||
{{ __('Cancel') }}
|
{{ __('Cancel') }}
|
||||||
</x-jet-secondary-button>
|
</x-jet-secondary-button>
|
||||||
|
|
||||||
<x-jet-button class="ml-3"
|
{{--<x-jet-button class="ml-3"
|
||||||
wire:click="logoutOtherBrowserSessions"
|
wire:click="logoutOtherBrowserSessions"
|
||||||
wire:loading.attr="disabled">
|
wire:loading.attr="disabled">
|
||||||
{{ __('Log Out Other Browser Sessions') }}
|
{{ __('Log Out Other Browser Sessions') }}
|
||||||
</x-jet-button>
|
</x-jet-button>--}}
|
||||||
</x-slot>
|
</x-slot>
|
||||||
</x-jet-dialog-modal>
|
</x-jet-dialog-modal>
|
||||||
</x-slot>
|
</x-slot>
|
||||||
|
|||||||
@@ -79,9 +79,9 @@
|
|||||||
<div class="mt-5">
|
<div class="mt-5">
|
||||||
@if (! $this->enabled)
|
@if (! $this->enabled)
|
||||||
<x-jet-confirms-password wire:then="enableTwoFactorAuthentication">
|
<x-jet-confirms-password wire:then="enableTwoFactorAuthentication">
|
||||||
<x-jet-button type="button" wire:loading.attr="disabled">
|
{{--<x-jet-button type="button" wire:loading.attr="disabled">
|
||||||
{{ __('Enable') }}
|
{{ __('Enable') }}
|
||||||
</x-jet-button>
|
</x-jet-button>--}}
|
||||||
</x-jet-confirms-password>
|
</x-jet-confirms-password>
|
||||||
@else
|
@else
|
||||||
@if ($showingRecoveryCodes)
|
@if ($showingRecoveryCodes)
|
||||||
|
|||||||
@@ -32,8 +32,8 @@
|
|||||||
{{ __('Saved.') }}
|
{{ __('Saved.') }}
|
||||||
</x-jet-action-message>
|
</x-jet-action-message>
|
||||||
|
|
||||||
<x-jet-button>
|
{{--<x-jet-button>
|
||||||
{{ __('Save') }}
|
{{ __('Save') }}
|
||||||
</x-jet-button>
|
</x-jet-button>--}}
|
||||||
</x-slot>
|
</x-slot>
|
||||||
</x-jet-form-section>
|
</x-jet-form-section>
|
||||||
|
|||||||
@@ -88,8 +88,8 @@
|
|||||||
{{ __('Saved.') }}
|
{{ __('Saved.') }}
|
||||||
</x-jet-action-message>
|
</x-jet-action-message>
|
||||||
|
|
||||||
<x-jet-button wire:loading.attr="disabled" wire:target="photo">
|
{{--<x-jet-button wire:loading.attr="disabled" wire:target="photo">
|
||||||
{{ __('Save') }}
|
{{ __('Save') }}
|
||||||
</x-jet-button>
|
</x-jet-button>--}}
|
||||||
</x-slot>
|
</x-slot>
|
||||||
</x-jet-form-section>
|
</x-jet-form-section>
|
||||||
|
|||||||
Reference in New Issue
Block a user