I have a custom Button in the content Editor (Share), basically it just runs a PSE Script that moves final layout to shared layout. Only a specific role can see the button. Now my problem is, that the button is enabled even if the user has no write access to the item, and therefore he can run the script. For the save button etc. it seems to work. Does anyone know what kind of logic determines if the button is enabled or disabled?
How can I disable the button if I click on an Item without write Access?