1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Got entity relation query permission application working

May be issues at points of use though, Added todo for this in code.
Also added extra indexes to collapsed table for better query
performance.
This commit is contained in:
Dan Brown
2023-01-13 17:10:20 +00:00
parent 2f1491c5a4
commit 932e1d7c61
3 changed files with 63 additions and 75 deletions

View File

@@ -18,8 +18,8 @@ class CreateCollapsedRolePermissionsTable extends Migration
Schema::create('entity_permissions_collapsed', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('role_id')->nullable();
$table->unsignedInteger('user_id')->nullable();
$table->unsignedInteger('role_id')->nullable()->index();
$table->unsignedInteger('user_id')->nullable()->index();
$table->string('entity_type');
$table->unsignedInteger('entity_id');
$table->boolean('view')->index();