X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/295cd0160525125bbd7756d7ad07392ae7201cb8..refs/pull/5681/head:/app/Permissions/ContentPermissionApiController.php diff --git a/app/Permissions/ContentPermissionApiController.php b/app/Permissions/ContentPermissionApiController.php index f883a292b..23b75db35 100644 --- a/app/Permissions/ContentPermissionApiController.php +++ b/app/Permissions/ContentPermissionApiController.php @@ -5,7 +5,7 @@ namespace BookStack\Permissions; use BookStack\Entities\EntityProvider; use BookStack\Entities\Models\Entity; use BookStack\Entities\Tools\PermissionsUpdater; -use BookStack\Http\Controllers\ApiController; +use BookStack\Http\ApiController; use Illuminate\Http\Request; class ContentPermissionApiController extends ApiController @@ -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.