1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Major permission naming refactor and database migration cleanup

This commit is contained in:
Dan Brown
2016-05-01 21:20:50 +01:00
parent 05666efda9
commit 75a4fc905b
42 changed files with 481 additions and 351 deletions

View File

@ -31,7 +31,7 @@ if (!function_exists('versioned_asset')) {
/**
* Check if the current user has a permission.
* If an ownable element is passed in the permissions are checked against
* If an ownable element is passed in the jointPermissions are checked against
* that particular item.
* @param $permission
* @param \BookStack\Ownable $ownable
@ -44,8 +44,8 @@ function userCan($permission, \BookStack\Ownable $ownable = null)
}
// Check permission on ownable item
$restrictionService = app('BookStack\Services\RestrictionService');
return $restrictionService->checkEntityUserAccess($ownable, $permission);
$permissionService = app('BookStack\Services\PermissionService');
return $permissionService->checkEntityUserAccess($ownable, $permission);
}
/**