def request_user_has_rule_action_permission(request, action_ref):
 if (not cfg.CONF.rbac.enable):
  return True
 user_db = get_user_db_from_request(request=request)
 action_db = action_utils.get_action_by_ref(ref=action_ref)
 action_resolver = resolvers.get_resolver_for_resource_type(ResourceType.ACTION)
 has_action_permission = action_resolver.user_has_resource_db_permission(user_db=user_db, resource_db=action_db, permission_type=PermissionType.ACTION_EXECUTE)
 if has_action_permission:
  return True
 return False

def request_user_has_rule_action_permission ( request , action_ref ) : if ( not cfg . CONF . rbac . enable ) : return True user_db = get_user_db_from_request ( request = request ) action_db = action_utils . get_action_by_ref ( ref = action_ref ) action_resolver = resolvers . get_resolver_for_resource_type ( ResourceType . ACTION ) has_action_permission = action_resolver . user_has_resource_db_permission ( user_db = user_db , resource_db = action_db , permission_type = PermissionType . ACTION_EXECUTE ) if has_action_permission : return True return False
check that the currently logged-in has necessary permissions on the action used / referenced inside the rule .