Restructuring controller delete #2

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.