mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-31 15:24:31 +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:
@ -120,6 +120,19 @@ class Role extends Model implements Loggable
|
||||
->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a role to represent the case of 'Everyone else' in the system.
|
||||
* Used within the interface since the default-fallback for permissions uses role_id=0.
|
||||
*/
|
||||
public static function getEveryoneElseRole(): self
|
||||
{
|
||||
return (new static())->forceFill([
|
||||
'id' => 0,
|
||||
'display_name' => 'Everyone Else',
|
||||
'description' => 'Set permissions for all roles not specifically overridden.'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
Reference in New Issue
Block a user