public TSStatus operatePermission(AuthorPlan authorPlan, boolean isGeneratedByPipe) {
    TSStatus tsStatus;
    // If the permissions change, clear the cache content affected by the operation
    LOGGER.info("Auth: run auth plan: {}", authorPlan.toString());
    try {
      if (authorPlan.getAuthorType() == ConfigPhysicalPlanType.CreateUser
          || authorPlan.getAuthorType() == ConfigPhysicalPlanType.RCreateUser
          || authorPlan.getAuthorType() == ConfigPhysicalPlanType.CreateRole
          || authorPlan.getAuthorType() == ConfigPhysicalPlanType.RCreateRole
          || authorPlan.getAuthorType() == ConfigPhysicalPlanType.CreateUserWithRawPassword) {
        tsStatus =
            getConsensusManager()
                .write(isGeneratedByPipe ? new PipeEnrichedPlan(authorPlan) : authorPlan);
      } else {
        List<TDataNodeConfiguration> allDataNodes =
            configManager.getNodeManager().getRegisteredDataNodes();
        tsStatus =
            configManager
                .getProcedureManager()
                .operateAuthPlan(authorPlan, allDataNodes, isGeneratedByPipe);
      }
      return tsStatus;
    } catch (final ConsensusException e) {
      LOGGER.warn("Failed in the write API executing the consensus layer due to: ", e);
      TSStatus res = new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode());
      res.setMessage(e.getMessage());
      return res;
    }
  }
Write permission.

@param authorPlan AuthorReq
@param isGeneratedByPipe whether the plan is operated by pipe receiver
@return TSStatus
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/PermissionManager.java