X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/141eecb858cce126452baeb16905e25b6ceb13c6..refs/pull/5721/head:/app/Permissions/ContentPermissionApiController.php diff --git a/app/Permissions/ContentPermissionApiController.php b/app/Permissions/ContentPermissionApiController.php index cd561fdee..bddbc2c7d 100644 --- a/app/Permissions/ContentPermissionApiController.php +++ b/app/Permissions/ContentPermissionApiController.php @@ -16,7 +16,7 @@ class ContentPermissionApiController extends ApiController ) { } - protected $rules = [ + protected array $rules = [ 'update' => [ 'owner_id' => ['int'], @@ -38,8 +38,10 @@ class ContentPermissionApiController extends ApiController /** * Read the configured content-level permissions for the item of the given type and ID. + * * 'contentType' should be one of: page, book, chapter, bookshelf. * 'contentId' should be the relevant ID of that item type you'd like to handle permissions for. + * * The permissions shown are those that override the default for just the specified item, they do not show the * full evaluated permission for a role, nor do they reflect permissions inherited from other items in the hierarchy. * Fallback permission values may be `null` when inheriting is active. @@ -57,6 +59,7 @@ class ContentPermissionApiController extends ApiController /** * Update the configured content-level permission overrides for the item of the given type and ID. * 'contentType' should be one of: page, book, chapter, bookshelf. + * * 'contentId' should be the relevant ID of that item type you'd like to handle permissions for. * Providing an empty `role_permissions` array will remove any existing configured role permissions, * so you may want to fetch existing permissions beforehand if just adding/removing a single item.