Restructuring controller delete

Check allow method first and then do the rest. In this way, we don't need to execute get method. So we save execution time.