lukaskleinschmidt / kirby-sortable

Making subpage managing a breeze
79 stars 6 forks source link

Disable sorting based on roles #46

Closed georgobermayr closed 6 years ago

georgobermayr commented 6 years ago

Hi,

We would need to have the option to disable sorting based on roles (and maybe other conditions). The current method in the blueprint with sortable: false is too global to do this and I can't find another method to do this with the currently possible extension options.

In my opinion this could be done nicely by binding it to a role permission. For instance if we have a permission like panel.page.sort and set it to false this would disable sorting in Kirby-Sortable.

What do you think?

Kind regards, Georg

lukaskleinschmidt commented 6 years ago

Sorry been ill the last few days and missed your issue. I will have a look at the permissions but I think that this should not be too hard to implement. Thanks for your suggestion 🙂

georgobermayr commented 6 years ago

Very good, thank you! If you can't find the time, just reach out, I think I can also write a pull request.

lukaskleinschmidt commented 6 years ago

I would absolutely accept a pull request on this one

georgobermayr commented 6 years ago

I just submitted a pull request that should solve this. Feel free to change if it is not according to your architecture or naming conventions!

lukaskleinschmidt commented 6 years ago

v2.4.0 fixes that now