ValidateAddDelegate method

void ValidateAddDelegate()
Validates this instance for AddDelegate.

Implementation

void ValidateAddDelegate() {
  // If any folder permission is Custom, throw
  //
  if (_delegateFolderPermissions.values.any(
    (permission) =>
        permission.PermissionLevel == DelegateFolderPermissionLevel.Custom,
  )) {
    throw ServiceValidationException(
      "Strings.CannotSetDelegateFolderPermissionLevelToCustom",
    );
  }
}