Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX getOwnerPage() should respect Versioned state. #975

Merged
merged 1 commit into from
May 30, 2022
Merged

FIX getOwnerPage() should respect Versioned state. #975

merged 1 commit into from
May 30, 2022

Conversation

wilr
Copy link
Member

@wilr wilr commented Apr 13, 2022

Previous to this getOwnerPage() would always return the Draft versioned
record. This would lead to cases were if a parent page contained draft
changes, unauthenicated users would be blocked from viewing content
blocks as $this->getOwnerPage()->canView($member); would fail since
logged out users could not view pages with draft changes.

Previous to this getOwnerPage() would always return the Draft versioned
record. This would lead to cases were if a parent page contained draft
changes, unauthenicated users would be blocked from viewing content
blocks as `$this->getOwnerPage()->canView($member);` would fail since
logged out users could not view pages with draft changes.
src/Models/ElementalArea.php Show resolved Hide resolved
src/Models/ElementalArea.php Show resolved Hide resolved
@GuySartorelli GuySartorelli dismissed their stale review May 30, 2022 01:20

overruled

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the new test fails without the other changes in this PR. Looks like a good change.

@GuySartorelli GuySartorelli merged commit b7d1c9a into silverstripe:4 May 30, 2022
@LABCAT
Copy link

LABCAT commented Sep 6, 2022

Hi there,

Just wondering when this will be included in a tagged version of 4.x branch?

We have a site that often experiences this issue so would really like to resolve this issue.

@GuySartorelli
Copy link
Member

GuySartorelli commented Sep 6, 2022

There's nothing stopping this from being released as a patch other than that it was targetting 4. I'll backport this to 4.9

menno-rdmkr pushed a commit to busting-bytes/silverstripe-elemental that referenced this pull request Dec 15, 2022
…wner

FIX getOwnerPage() should respect Versioned state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants