Disable Side Menu

Hi,
I have a Side menu app and I want to disable/enable the side menu based on certain condition. How can i achieve this?