def action_allowed_user(user, app, action):
 if (not user.is_authenticated()):
  return False
 return any((match_rules(group.rules, app, action) for group in user.groups_list))

def action_allowed_user ( user , app , action ) : if ( not user . is_authenticated ( ) ) : return False return any ( ( match_rules ( group . rules , app , action ) for group in user . groups_list ) )
similar to action_allowed .