mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Added joint_user_permissions handling to query system
Some issues exist to resolve though, not in final state.
This commit is contained in:
@@ -10,6 +10,7 @@ use BookStack\Actions\View;
|
||||
use BookStack\Auth\Permissions\EntityPermission;
|
||||
use BookStack\Auth\Permissions\JointPermission;
|
||||
use BookStack\Auth\Permissions\JointPermissionBuilder;
|
||||
use BookStack\Auth\Permissions\JointUserPermission;
|
||||
use BookStack\Auth\Permissions\PermissionApplicator;
|
||||
use BookStack\Entities\Tools\SlugGenerator;
|
||||
use BookStack\Interfaces\Deletable;
|
||||
@@ -194,6 +195,14 @@ abstract class Entity extends Model implements Sluggable, Favouritable, Viewable
|
||||
return $this->morphMany(JointPermission::class, 'entity');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the join user permissions for this entity.
|
||||
*/
|
||||
public function jointUserPermissions(): MorphMany
|
||||
{
|
||||
return $this->morphMany(JointUserPermission::class, 'entity');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the related delete records for this entity.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user