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

Fixed collapsed perm. gen for book sub-items.

Also converted the existing "JointPermission" usage to the new
collapsed permission system.
This commit is contained in:
Dan Brown
2022-12-23 13:56:22 +00:00
parent 7330139555
commit 451e4ac452
19 changed files with 115 additions and 139 deletions

View File

@@ -55,8 +55,9 @@ function hasAppAccess(): bool
}
/**
* Check if the current user has a permission. If an ownable element
* is passed in the jointPermissions are checked against that particular item.
* Check if the current user has a permission.
* Checks a generic role permission or, if an ownable model is passed in, it will
* check against the given entity model, taking into account entity-level permissions.
*/
function userCan(string $permission, Model $ownable = null): bool
{