def any_permission_required(*perms):
 def test(user):
  for perm in perms:
   if user.has_perm(perm):
    return True
  return False
 return user_passes_test(test)

def any_permission_required ( * perms ) : def test ( user ) : for perm in perms : if user . has_perm ( perm ) : return True return False return user_passes_test ( test )
if any permission passes .