code: public void setUserPermission(String userName, List<Permission> permissions){
          getServiceDirectoryClient().setACL(new ACL(AuthScheme.DIRECTORY, userName, PermissionUtil.permissionList2Id(permissions)));
      }
docs: Set the user permission.
  
  @param userName
  the user name.
  @param permissions
  the user permission.