Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions DynamicRoleSupport.module
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,14 @@ class DynamicRoleSupport extends WireData implements Module, ConfigurableModule
$query = $this->wire('database')->prepare($sql);
$query->bindValue(':id', $page->id);
$query->execute();
}
}

// We're not interested in any process related permissions
$tempProcess = $page->process;
$page->process = null;

$guest = $this->wire('users')->get('guest');
$guestViewable = $page->viewable($guest);
$guest = $this->wire('users')->get('guest');
$guestViewable = $page->viewable($guest);

foreach($this->wire('droles') as $drole) {

Expand Down Expand Up @@ -564,7 +568,10 @@ class DynamicRoleSupport extends WireData implements Module, ConfigurableModule
break;
}
}
}
}

// Reset nullified process for page
$page->process = $tempProcess;

// if something is editable, it must also be viewable
if(($editable || $addable) && !$viewable) $viewable = true;
Expand Down