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

chore: version permissions #6068

Merged
merged 3 commits into from Apr 29, 2024
Merged

chore: version permissions #6068

merged 3 commits into from Apr 29, 2024

Conversation

jacobsfletch
Copy link
Member

@jacobsfletch jacobsfletch commented Apr 26, 2024

Description

Closes payloadcms/payload-3.0-demo#146. Collections without version read access would still render their versions tab, ultimately leading the user to a 403. For the record, this is in fact the current behavior of 2.0. This is mostly a quality of life improvement. Permissions are now thread to each tab's condition function so that it can determine its own logic. Versions were also previously being requested (403ing) even though we already know whether they have read access to versions. Now, no versions are fetched unless needed.

  • I have read and understand the CONTRIBUTING.md document in this repository.

@jacobsfletch jacobsfletch merged commit 3223176 into beta Apr 29, 2024
30 of 31 checks passed
@jacobsfletch jacobsfletch deleted the fix/versions-permissions branch April 29, 2024 12:22
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.

Collection access.readVersions set to false does not hide versions tab, nor prevent unnecessary api request
1 participant