-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added check for owned packages and some tests
- Loading branch information
1 parent
84e2929
commit fb21e0e
Showing
5 changed files
with
113 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/NuGetGallery/Areas/Admin/Models/ValidateUsernameResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace NuGetGallery.Areas.Admin.Models | ||
{ | ||
public class ValidateUsernameResult | ||
{ | ||
public bool IsFormatValid { get; set; } | ||
public bool IsAvailable { get; set; } | ||
public IEnumerable<string> OwnedPackageIds { get; set; } = new List<string>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ public Fakes() | |
|
||
ApiKeyV3PlaintextValue = "889e180e-335c-491a-ac26-e83c4bd31d87"; | ||
|
||
User = new User("testUser") | ||
User = new User("testUser") // NOTE: Do not change the casing of this username. It will break tests for the ChangeUsername in the Admin Panel | ||
{ | ||
Key = key++, | ||
EmailAddress = "[email protected]", | ||
|
@@ -58,7 +58,7 @@ public Fakes() | |
|
||
ApiKeyV4PlaintextValue = apiKeyV4PlaintextValue; | ||
|
||
Organization = new Organization("testOrganization") | ||
Organization = new Organization("testOrganization") // NOTE: Do not change the casing of this username. It will break tests for the ChangeUsername in the Admin Panel | ||
{ | ||
Key = key++, | ||
EmailAddress = "[email protected]", | ||
|