Lock or unlock a directory.
Just put the .desktop file in ~/.local/share/kservices5/ServiceMenus
If you want to use it on non-user-owned directories (as in root-owned),
comment out the "Exec" line and uncomment the line below.
The third lines add "an extra lever of protection" - they also change ownership to root (and back to user... so they're not meant to be used for root-owned directories).
To move this out of top-level and into Actions, remove/comment-out the "X-KDE-Priority=TopLevel" line.