1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)