public static AccessControlProtos.UsersAndPermissions toUsersAndPermissions(String user,
    Permission perms) {
    return AccessControlProtos.UsersAndPermissions.newBuilder()
      .addUserPermissions(AccessControlProtos.UsersAndPermissions.UserPermissions.newBuilder()
        .setUser(ByteString.copyFromUtf8(user)).addPermissions(toPermission(perms)).build())
      .build();
  }
Create a request to grant user global permissions.
@param username the short user name who to grant permissions
@param actions  the permissions to be granted
@return A {@link AccessControlProtos} GrantRequest
hbase-client/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlUtil.java