setReadAccess method

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

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

Implementation

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