Protecting disableDashboard function