@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | $builder->whereIn($model->getTable().'.assigned_user_id', $user->getAllowedGroupUuids()); |
28 | 28 | |
29 | 29 | // Records assigned to an user with roles subordonate to the roles of the user |
30 | - $builder->orWhereIn($model->getTable().'.assigned_user_id', function ($query) use ($user) { |
|
30 | + $builder->orWhereIn($model->getTable().'.assigned_user_id', function($query) use ($user) { |
|
31 | 31 | $entityTable = with(new Entity)->getTable(); |
32 | 32 | $privilegesTable = env('UCCELLO_TABLE_PREFIX', 'uccello_').'privileges'; |
33 | 33 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $query->select($entityTable.'.id') |
38 | 38 | ->from($entityTable) |
39 | - ->join($privilegesTable, function ($join) use($entityTable, $privilegesTable, $subordonateRolesIds) { |
|
39 | + ->join($privilegesTable, function($join) use($entityTable, $privilegesTable, $subordonateRolesIds) { |
|
40 | 40 | $join->on("$privilegesTable.user_id", '=', $entityTable.'.record_id') |
41 | 41 | ->whereIn("$privilegesTable.role_id", $subordonateRolesIds); |
42 | 42 | }) |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | // Records created by the user |
47 | 47 | if (!empty($model->module)) { |
48 | - $builder->orWhereIn($model->getTable().'.'.$model->getKeyName(), function ($query) use($model) { |
|
48 | + $builder->orWhereIn($model->getTable().'.'.$model->getKeyName(), function($query) use($model) { |
|
49 | 49 | $query->select('record_id') |
50 | 50 | ->from(with(new Entity)->getTable()) |
51 | 51 | ->where('module_id', $model->module->id ?? null) |