Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Inconsistency between PagesLoader::findOne() and PagesLoader::find() using options to override access control #1897

Copy link
Copy link
Closed
@kixe

Description

@kixe
Issue body actions

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']);

Maybe related:
#1552
#1507

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.