public static void removeUserPermission(Configuration conf, UserPermission userPerm, Table t)
    throws IOException {
    if (
      null == userPerm.getPermission().getActions()
        || userPerm.getPermission().getActions().length == 0
    ) {
      removePermissionRecord(conf, userPerm, t);
    } else {
      // Get all the global user permissions from the acl table
      List<UserPermission> permsList = getUserPermissions(conf,
        userPermissionRowKey(userPerm.getPermission()), null, null, null, false);
      List<Permission.Action> remainingActions = new ArrayList<>();
      List<Permission.Action> dropActions = Arrays.asList(userPerm.getPermission().getActions());
      for (UserPermission perm : permsList) {
        // Find the user and remove only the requested permissions
        if (perm.getUser().equals(userPerm.getUser())) {
          for (Permission.Action oldAction : perm.getPermission().getActions()) {
            if (!dropActions.contains(oldAction)) {
              remainingActions.add(oldAction);
            }
          }
          if (!remainingActions.isEmpty()) {
            perm.getPermission()
              .setActions(remainingActions.toArray(new Permission.Action[remainingActions.size()]));
            addUserPermission(conf, perm, t);
          } else {
            removePermissionRecord(conf, userPerm, t);
          }
          break;
        }
      }
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug("Removed permission " + userPerm.toString());
    }
  }
Removes a previously granted permission from the stored access control lists. The
{@link TablePermission} being removed must exactly match what is stored -- no wildcard matching
is attempted. Ie, if user "bob" has been granted "READ" access to the "data" table, but only to
column family plus qualifier "info:colA", then trying to call this method with only user "bob"
and the table name "data" (but without specifying the column qualifier "info:colA") will have
no effect.
@param conf     the configuration
@param userPerm the details of the permission to be revoked
@param t        acl table
@throws IOException if there is an error accessing the metadata table
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/PermissionStorage.java