Closed
Description
Short description of the issue
PagesLoader::findOne() does not take into account settings in options to override access control, whereas PagesLoader::find() does.
Consistency is given if access is controlled via the selector.
// EXAMPLE:
// Given an access controlled page with ID 1234 and a user not allowed to view this page
// expected results – will return the access controlled page
$accessControlledPage = wire('pages')->find(1234, ['findAll' => true])->first();
$accessControlledPage = wire('pages')->find(1234, ['include' =>'all'])->first();
$accessControlledPage = wire('pages')->findOne("id=1234,include=all");
$accessControlledPage = wire('pages')->findOne("id=1234,check_access=0");
// unexpected results – will return NullPage
$accessControlledPage = wire('pages')->findOne(1234, ['findAll' => true]);
$accessControlledPage = wire('pages')->findOne(1234, ['include' =>'all']);
Setup/Environment
- ProcessWire version: 3.0.236
- (Optional) PHP version:
- (Optional) MySQL version:
- (Optional) Any 3rd party modules that are installed and could be related to the issue: