mirror of
https://github.com/bitwarden/server.git
synced 2025-04-21 13:05:11 -05:00
limit to 500 on non self-hosted
This commit is contained in:
parent
f2e2db52a1
commit
448ab08b19
@ -335,9 +335,9 @@ namespace Bit.Api.Controllers
|
|||||||
[HttpPost("delete")]
|
[HttpPost("delete")]
|
||||||
public async Task DeleteMany([FromBody]CipherBulkDeleteRequestModel model)
|
public async Task DeleteMany([FromBody]CipherBulkDeleteRequestModel model)
|
||||||
{
|
{
|
||||||
if(model.Ids.Count() > 200)
|
if(!_globalSettings.SelfHosted && model.Ids.Count() > 500)
|
||||||
{
|
{
|
||||||
throw new BadRequestException("You can only delete up to 200 items at a time.");
|
throw new BadRequestException("You can only delete up to 500 items at a time.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var userId = _userService.GetProperUserId(User).Value;
|
var userId = _userService.GetProperUserId(User).Value;
|
||||||
@ -348,9 +348,9 @@ namespace Bit.Api.Controllers
|
|||||||
[HttpPost("move")]
|
[HttpPost("move")]
|
||||||
public async Task MoveMany([FromBody]CipherBulkMoveRequestModel model)
|
public async Task MoveMany([FromBody]CipherBulkMoveRequestModel model)
|
||||||
{
|
{
|
||||||
if(model.Ids.Count() > 200)
|
if(!_globalSettings.SelfHosted && model.Ids.Count() > 500)
|
||||||
{
|
{
|
||||||
throw new BadRequestException("You can only move up to 200 items at a time.");
|
throw new BadRequestException("You can only move up to 500 items at a time.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var userId = _userService.GetProperUserId(User).Value;
|
var userId = _userService.GetProperUserId(User).Value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user