setWriteAccess method

void setWriteAccess({
  1. required String userId,
  2. bool allowed = true,
})

Set whether the given user id is allowed to write this object.

Implementation

void setWriteAccess({required String userId, bool allowed = true}) {
  final bool readPermission = getReadAccess(userId: userId);
  _setPermissionsIfNonEmpty(
      userId: userId,
      readPermission: readPermission,
      writePermission: allowed);
}