mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Added user-interface for "Everyone Else" entity permission item
Nothing on back-end logic done to hook this new option up. Addition of permissions for role_id=0 works out of the box, but active "everyone else" permissions, with no priviliges, is currently not working. Needs change of permission gen logic also.
This commit is contained in:
@ -184,8 +184,10 @@ abstract class Entity extends Model implements Sluggable, Favouritable, Viewable
|
||||
*/
|
||||
public function hasRestriction(int $role_id, string $action): bool
|
||||
{
|
||||
return $this->permissions()->where('role_id', '=', $role_id)
|
||||
->where('action', '=', $action)->count() > 0;
|
||||
return $this->permissions()
|
||||
->where('role_id', '=', $role_id)
|
||||
->where('action', '=', $action)
|
||||
->count() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user