How to enable and disable actions