Beispiel #1
0
        public async Task DeleteMany([FromBody] CipherBulkDeleteRequestModel model)
        {
            if (!_globalSettings.SelfHosted && model.Ids.Count() > 500)
            {
                throw new BadRequestException("You can only delete up to 500 items at a time. " +
                                              "Consider using the \"Purge Vault\" option instead.");
            }

            var userId = _userService.GetProperUserId(User).Value;
            await _cipherService.DeleteManyAsync(model.Ids.Select(i => new Guid(i)), userId);
        }
Beispiel #2
0
        public async Task DeleteMany([FromBody] CipherBulkDeleteRequestModel model)
        {
            if (model.Ids.Count() > 200)
            {
                throw new BadRequestException("You can only delete up to 200 items at a time.");
            }

            var userId = _userService.GetProperUserId(User).Value;
            await _cipherService.DeleteManyAsync(model.Ids.Select(i => new Guid(i)), userId);
        }
Beispiel #3
0
 public async Task DeleteMany([FromBody] CipherBulkDeleteRequestModel model)
 {
     var userId = _userService.GetProperUserId(User).Value;
     await _cipherService.DeleteManyAsync(model.Ids.Select(i => new Guid(i)), userId);
 }