checkRolePluginsRights(role, { force = false, forceWarn = false } = {}) {
    const plugins = global.kuzzle.pluginsManager;

    for (const roleController of Object.keys(role.controllers)) {
      if (
        roleController === "*" ||
        global.kuzzle.funnel.isNativeController(roleController)
      ) {
        return;
      }

      if (!plugins.isController(roleController)) {
        if (!force) {
          throw roleRightsError.get(
            "unknown_controller",
            role._id,
            roleController,
            didYouMean(roleController, plugins.getControllerNames()),
          );
        }

        // Do not print any warning if Kuzzle is not started or if warn is not forced.
        // We need this to load rights without displaying warning at startup
        // because plugins controllers are loaded after default roles
        // then we need to display non-existing controllers with the sanity check
        // made after plugins controllers loading.
        if (global.kuzzle.state === kuzzleStateEnum.RUNNING || forceWarn) {
          global.kuzzle.log.warn(
            `The role "${role._id}" gives access to the non-existing controller "${roleController}".`,
          );
        }

        return;
      }

      const roleActions = Object.keys(role.controllers[roleController].actions);
      for (const action of roleActions) {
        if (action !== "*" && !plugins.isAction(roleController, action)) {
          if (!force) {
            throw roleRightsError.get(
              "unknown_action",
              role._id,
              action,
              roleController,
              didYouMean(action, plugins.getActions(roleController)),
            );
          }

          // see the other comment
          if (global.kuzzle.state === kuzzleStateEnum.RUNNING || forceWarn) {
            global.kuzzle.log.warn(
              `The role "${role._id}" gives access to the non-existing action "${action}" for the controller "${roleController}".`,
            );
          }
        }
      }
    }
  }
Given a Role object, checks if its controllers and actions exist in plugins.

@param {Role} role
@param {Force} force