-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revoked permission to unauthenticated role
- Loading branch information
Dawid Miklas
committed
Sep 25, 2023
1 parent
29f7be8
commit d85f1ef
Showing
2 changed files
with
176 additions
and
125 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...rations/2023_09_25_102109_remove_password_change_permission_from_unauthenticated_user.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
use App\Models\Role; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration { | ||
public function up(): void | ||
{ | ||
Role::query()->where('name', 'Unauthenticated')->first()->revokePermissionTo( | ||
'auth.password_change', | ||
); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Role::query()->where('name', 'Unauthenticated')->first()->givePermissionTo( | ||
'auth.password_change', | ||
); | ||
} | ||
}; |
Oops, something went wrong.