Added checking permission while toggling the plugin - plugins ajaxpage