Closed
Description
Expected behavior
When the current sort mode of an object is index
the user should be able to change it to key
, and vice versa.
Actual behavior
When the current mode is index
the user is only able to change it to index
(which makes no sense as it is the current mode already). When you are an admin all the 3 possible sort modes are available.
I have looked in the code and the bug seems to be in https://github.com/pimcore/pimcore/blob/10.x/bundles/AdminBundle/Resources/public/js/pimcore/object/tree.js#L725.
currentSortMethod == "index"
should be currentSortMethod != "index"
imo, same applies for the condition currentSortMethod == "key"
.
Steps to reproduce
- Login is an non admin user
- Right click an object. And check sort mode, by_index is missing