Skip to content

Commit 116db70

Browse files
committed
Immediately returning from AdminActionAttribute.OnAuthorization upon determining result.
1 parent 5bc912b commit 116db70

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/NuGetGallery/Filters/AdminActionAttribute.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public override void OnAuthorization(AuthorizationContext filterContext)
1717
if (!AdminHelper.IsAdminPanelEnabled)
1818
{
1919
filterContext.Result = new HttpStatusCodeResult(HttpStatusCode.Forbidden);
20+
return;
2021
}
2122

2223
Roles = "Admins";

0 commit comments

Comments
 (0)