code: public boolean getWriteAccess(String userId) {
      if (StringUtil.isEmpty(userId)) {
        return false;
      }
      Permissions permissions = permissionsById.get(userId);
      return permissions != null && permissions.getWritePermission();
    }
docs: Get whether the given user id is *explicitly* allowed to write this object. Even if this
  returns {@code false}, the user may still be able to write it if getPublicWriteAccess returns
  {@code true} or a role that the user belongs to has write access.