1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

SM-528: Fix SM Import / Export Error Messaging (#2734)

* SM-528: Update SM Import & Export errors when non-admin

* SM-528: Switch to not found exception
This commit is contained in:
Colton Hurst
2023-02-27 10:14:50 -05:00
committed by GitHub
parent f11c58e396
commit 6d251236da

View File

@ -33,7 +33,7 @@ public class SecretsManagerPortingController : Controller
{
if (!await _currentContext.OrganizationAdmin(organizationId))
{
throw new UnauthorizedAccessException();
throw new NotFoundException();
}
var userId = _userService.GetProperUserId(User).Value;
@ -53,7 +53,7 @@ public class SecretsManagerPortingController : Controller
{
if (!await _currentContext.OrganizationAdmin(organizationId))
{
throw new UnauthorizedAccessException();
throw new NotFoundException();
}
if (importRequest.Projects?.Count() > 1000 || importRequest.Secrets?.Count() > 6000)