Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed May 7, 2017
2 parents 102e326 + 75981c2 commit dc0bf8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Services/PermissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ protected function createJointPermissionData(Entity $entity, Role $role, $action
$hasPermissiveAccessToParents = !$book->restricted;

// For pages with a chapter, Check if explicit permissions are set on the Chapter
if ($entity->isA('page') && $entity->chapter_id !== 0) {
if ($entity->isA('page') && $entity->chapter_id !== 0 && $entity->chapter_id !== '0') {
$chapter = $this->getChapter($entity->chapter_id);
$hasPermissiveAccessToParents = $hasPermissiveAccessToParents && !$chapter->restricted;
if ($chapter->restricted) {
Expand Down

0 comments on commit dc0bf8a

Please sign in to comment.