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

Support role permissions for preview option #6572

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

distantnative
Copy link
Member

@distantnative distantnative commented Jul 25, 2024

Description

Summary of changes

  • Blueprint classes for ::preview() are now using the permissions to actually resolve what to return
  • This allows not just to set true/false or the string, but an array with role-based permissions

Changelog

Fixes

Breaking changes

  • $file->previewUrl() returns null if the user has no permission for the file's parent (page/site) preview

Ready?

  • In-code documentation (wherever needed)
  • Unit tests for fixed bug/feature
  • Tests and CI checks all pass

For review team

  • Add changes & docs to release notes draft in Notion

@distantnative distantnative added this to the 4.4.0 milestone Jul 25, 2024
@distantnative distantnative requested a review from a team July 25, 2024 11:17
@distantnative distantnative self-assigned this Jul 25, 2024
@distantnative distantnative marked this pull request as ready for review July 25, 2024 11:23
@distantnative distantnative merged commit a2a57a6 into develop-minor Aug 1, 2024
12 checks passed
@distantnative distantnative deleted the fix/6400-preview-permission-per-role branch August 1, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Adding role-specific preview permission to blueprint results in Panel error
2 participants