mirror of
https://github.com/bitwarden/server
synced 2025-12-15 07:43:54 +00:00
limit to 500 on non self-hosted
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user