Roles via Nextcloud groups: sms-admin/manager/viewer + fix OAuth instance_uri
Deploy / deploy (push) Successful in 29s
Deploy / deploy (push) Successful in 29s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
fc4579c47d
commit
2937004118
16 files changed
+506
-5
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Spatie\Permission\Models\Role;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
app()[\Spatie\Permission\PermissionRegistrar::class]->forgetCachedPermissions();
|
||||
|
||||
foreach (['sms-admin', 'sms-manager', 'sms-viewer'] as $role) {
|
||||
Role::firstOrCreate(['name' => $role, 'guard_name' => 'web']);
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Role::whereIn('name', ['sms-admin', 'sms-manager', 'sms-viewer'])->delete();
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user