mirror of
https://github.com/bitwarden/server.git
synced 2025-04-08 06:28:14 -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:
parent
f11c58e396
commit
6d251236da
@ -33,7 +33,7 @@ public class SecretsManagerPortingController : Controller
|
|||||||
{
|
{
|
||||||
if (!await _currentContext.OrganizationAdmin(organizationId))
|
if (!await _currentContext.OrganizationAdmin(organizationId))
|
||||||
{
|
{
|
||||||
throw new UnauthorizedAccessException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
var userId = _userService.GetProperUserId(User).Value;
|
var userId = _userService.GetProperUserId(User).Value;
|
||||||
@ -53,7 +53,7 @@ public class SecretsManagerPortingController : Controller
|
|||||||
{
|
{
|
||||||
if (!await _currentContext.OrganizationAdmin(organizationId))
|
if (!await _currentContext.OrganizationAdmin(organizationId))
|
||||||
{
|
{
|
||||||
throw new UnauthorizedAccessException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (importRequest.Projects?.Count() > 1000 || importRequest.Secrets?.Count() > 6000)
|
if (importRequest.Projects?.Count() > 1000 || importRequest.Secrets?.Count() > 6000)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user