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:
parent
f11c58e396
commit
6d251236da
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user