restrict user from deleting all classes