code: public void setWriteAccess(String userId, boolean allowed) {
      if (StringUtil.isEmpty(userId)) {
        throw new IllegalArgumentException("cannot setRead/WriteAccess for null userId");
      }
      boolean readPermission = getReadAccess(userId);
      setPermissionsIfNonEmpty(userId, readPermission, allowed);
    }
docs: Set whether the given user id is allowed to write this object.