示例#1
0
        public async Task Delete(string orgId, string id)
        {
            var subvault = await _subvaultRepository.GetByIdAsync(new Guid(id));

            if (subvault == null || !_currentContext.OrganizationAdmin(subvault.OrganizationId))
            {
                throw new NotFoundException();
            }

            await _subvaultRepository.DeleteAsync(subvault);
        }
示例#2
0
        public async Task Delete(string orgId, string id)
        {
            var subvault = await _subvaultRepository.GetByIdAdminUserIdAsync(new Guid(id),
                                                                             _userService.GetProperUserId(User).Value);

            if (subvault == null)
            {
                throw new NotFoundException();
            }

            await _subvaultRepository.DeleteAsync(subvault);
        }