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 objects tree sort method check #13

Open
wants to merge 1 commit into
base: 10.5
Choose a base branch
from

Conversation

zoidbergx
Copy link
Member

Changes in this pull request

Changed check for sort menu in object tree to show the sort method.

I don't know what the original implentation should cover but in my understanding we have following initial position:

  • There is a specific permission to disallow changing the data objects sort method BUT not the sorting itself
    grafik
  • If we disallow the permission with the current implementation the user is still able to change the sort method because of the check in tree.js

With this change the user is not allowed to change the "sort method" but he is still allowed to change the sorting itself either by A-Z / Z-A or manually by changing the index via drag and drop.

To disallow the sorting itself, for me this a different topic and not covered with the permission objects_sort_method

HOW

  • prepare a folder with e.g. an admin user and set the sort method to A-Z
    grafik
  • create a User without the permission objects_sort_method
    grafik
  • the user is still allowed to change the sort method
    grafik

CHANGE IN THIS PR

With this patch the user is still allowed to change the sorting but not the sort method
grafik

@github-actions
Copy link

github-actions bot commented May 10, 2023

Review Checklist

  • Target branch (10.5 for bug fixes, others 11.x)
  • Bug fix: check if files are affected that were moved to a bundle - create a PR there if applicable
  • Tests (if it's testable code, there should be a test for it - get help)
  • Docs (every functionality needs to be documented, see here)
  • Migration incl. install.sql (e.g. if the database schema changes, ...)
  • Upgrade notes (deprecations, important information, migration hints, ...)
  • Label
  • Milestone

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.

1 participant