Skip to content

Commit

Permalink
revoked permission to unauthenticated role
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawid Miklas committed Sep 25, 2023
1 parent 29f7be8 commit d85f1ef
Show file tree
Hide file tree
Showing 2 changed files with 176 additions and 125 deletions.
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',
);
}
};
Loading

0 comments on commit d85f1ef

Please sign in to comment.