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

API Standardise extension hooks #1485

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli marked this pull request as draft August 18, 2024 21:48
@GuySartorelli GuySartorelli force-pushed the pulls/3/standardise-extension-hooks branch 2 times, most recently from cb405cc to 9c0a446 Compare August 20, 2024 04:23
$this->logInWithPermission('ADMIN');
$this->logInWithPermission('CMS_ACCESS_CampaignAdmin');
Copy link
Member Author

Choose a reason for hiding this comment

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

Having admin access results in an early return true in versioned canPublish() so our extension wasn't being called which resulted in incorrectly failing unit tests.

That's only just not become a thing because the path for public methods on extensions is different - it was being called "directly" (earlier than the versioned method) instead of being used as an extension hook.

@GuySartorelli GuySartorelli marked this pull request as ready for review August 22, 2024 02:39
@GuySartorelli GuySartorelli force-pushed the pulls/3/standardise-extension-hooks branch from 9c0a446 to 575bc5b Compare August 26, 2024 02:45
@emteknetnz emteknetnz merged commit 6f78dc5 into silverstripe:3 Aug 27, 2024
12 of 14 checks passed
@emteknetnz emteknetnz deleted the pulls/3/standardise-extension-hooks branch August 27, 2024 03:39
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.

2 participants