ValidateUpdateDelegate method

void ValidateUpdateDelegate()
Validates this instance for UpdateDelegate.

Implementation

void ValidateUpdateDelegate() {
  // If any folder permission was changed to custom, throw
  //
  if (_delegateFolderPermissions.values.any(
    (permission) =>
        permission.PermissionLevel == DelegateFolderPermissionLevel.Custom &&
        !permission.IsExistingPermissionLevelCustom,
  )) {
    throw ServiceValidationException(
      "Strings.CannotSetDelegateFolderPermissionLevelToCustom",
    );
  }
}