mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-22 14:49:59 +08:00
Continued with database work for permissions overhaul
Added to the entity_permissions table with further required fields and indexes. Wrote the code for checking permissions.
This commit is contained in:
@ -19,7 +19,16 @@ class CreateEntityPermissionsTable extends Migration
|
||||
$table->integer('entity_id');
|
||||
$table->string('action');
|
||||
$table->boolean('has_permission')->default(false);
|
||||
$table->boolean('has_permission_own')->default(false);
|
||||
$table->integer('created_by');
|
||||
$table->index(['entity_id', 'entity_type']);
|
||||
$table->index('role_id');
|
||||
$table->index('action');
|
||||
$table->index('created_by');
|
||||
});
|
||||
|
||||
$restrictionService = app(\BookStack\Services\RestrictionService::class);
|
||||
$restrictionService->buildEntityPermissions();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user