Refactored has_perm from User model