Created
January 31, 2014 17:36
-
-
Save anonymous/8738171 to your computer and use it in GitHub Desktop.
Cleaner (shorter) way to write this?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def can_delete? (object) | |
r_val = false | |
r_val = can_delete_by_core_role? object | |
unless r_val | |
r_val = can_delete_by_owner? object | |
unless r_val | |
r_val = can_delete_by_zone_role? object | |
unless r_val | |
r_val = can_delete_by_access_profile? object | |
end | |
end | |
end | |
return r_val | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment