Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title of newly uploaded package should not match existing package registration id #2850

Merged
merged 1 commit into from
Jan 14, 2016

Conversation

maartenba
Copy link
Contributor

Fixes #2849

On upload/edit package:

  • Title of newly uploaded package should not match existing package registration id
  • New package registration id should not match an existing package title

/cc @yishaigalatzer @joyhui @joelverhagen

{
if (string.IsNullOrEmpty(registrationId))
{
throw new ArgumentNullException("registrationId");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be updated to nameof(registrationId) once #2846 gets enough :shipit:

@maartenba
Copy link
Contributor Author

Please review, @joyhui @yishaigalatzer @johnataylor @xavierdecoster

.SingleOrDefault(pr => pr.Id.ToLower() == cleanedTitle);

if (packageRegistration != null
&& !String.Equals(packageRegistration.Id, registrationId, StringComparison.OrdinalIgnoreCase))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: lowercase string in String.Equals

@xavierdecoster
Copy link
Member

:shipit:

1 similar comment
@joyhui
Copy link

joyhui commented Jan 13, 2016

:shipit:

maartenba added a commit that referenced this pull request Jan 14, 2016
Title of newly uploaded package should not match existing package registration id
@maartenba maartenba merged commit 8b23ef6 into dev Jan 14, 2016
@maartenba maartenba deleted the issue-2849 branch January 14, 2016 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants