Skip to content

Commit ea8c290

Browse files
authored
[NuGet Symbol Server] Auditing - Gallery core changes (#6427)
1 parent 95e5a89 commit ea8c290

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

src/NuGetGallery.Core/Auditing/AuditedAuthenticatedOperationAction.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ public enum AuditedAuthenticatedOperationAction
2323
/// <summary>
2424
/// Login failed, user is an organization and should not have credentials.
2525
/// </summary>
26-
FailedLoginUserIsOrganization
26+
FailedLoginUserIsOrganization,
27+
28+
/// <summary>
29+
/// Symbol package push was attempted by a non-owner of the package
30+
/// </summary>
31+
SymbolsPackagePushAttemptByNonOwner
2732
}
2833
}

src/NuGetGallery.Core/Auditing/AuditedPackageAction.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public enum AuditedPackageAction
1515
Edit,
1616
[Obsolete("Undo package edit functionality is being retired.")]
1717
UndoEdit,
18-
Verify
18+
Verify,
19+
SymbolsCreate,
20+
SymbolsDelete
1921
}
2022
}

tests/NuGetGallery.Core.Facts/Auditing/AuditedAuthenticatedOperationActionTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public void Definition_HasNotChanged()
1515
"FailedLoginInvalidPassword",
1616
"FailedLoginNoSuchUser",
1717
"FailedLoginUserIsOrganization",
18-
"PackagePushAttemptByNonOwner"
18+
"PackagePushAttemptByNonOwner",
19+
"SymbolsPackagePushAttemptByNonOwner"
1920
};
2021

2122
Verify(typeof(AuditedAuthenticatedOperationAction), expectedNames);

tests/NuGetGallery.Core.Facts/Auditing/AuditedPackageActionTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public void Definition_HasNotChanged()
1919
"SoftDelete",
2020
"Unlist",
2121
"UndoEdit",
22-
"Verify"
22+
"Verify",
23+
"SymbolsCreate",
24+
"SymbolsDelete"
2325
};
2426

2527
Verify(typeof(AuditedPackageAction), expectedNames);

0 commit comments

Comments
 (0)