public async Task DeleteAsync(Cipher cipher, Guid deletingUserId, bool orgAdmin = false) { if (!orgAdmin && !(await UserCanEditAsync(cipher, deletingUserId))) { throw new BadRequestException("You do not have permissions to delete this."); } await _cipherRepository.DeleteAsync(cipher); await _attachmentStorageService.DeleteAttachmentsForCipherAsync(cipher.Id); // push await _pushService.PushSyncCipherDeleteAsync(cipher); }
public async Task DeleteAsync(Cipher cipher) { await _cipherRepository.DeleteAsync(cipher); // push await _pushService.PushSyncCipherDeleteAsync(cipher); }
public async Task DeleteDataAsync(string id) { await _cipherRepository.DeleteAsync(id); CachedCiphers = null; _appSettingsService.ClearCiphersCache = true; }
public async Task DeleteAsync(CipherDetails cipher, Guid deletingUserId) { if (!(await UserCanEditAsync(cipher, deletingUserId))) { throw new BadRequestException("Not an admin."); } await _cipherRepository.DeleteAsync(cipher); // push //await _pushService.PushSyncCipherDeleteAsync(cipher); }
public async Task DeleteDataAsync(string id, bool sendMessage) { if (sendMessage) { var cipherData = await _cipherRepository.GetByIdAsync(id); if (cipherData != null && Application.Current != null) { MessagingCenter.Send(Application.Current, "DeletedCipher", new Cipher(cipherData)); } } await _cipherRepository.DeleteAsync(id); CachedCiphers = null; _appSettingsService.ClearCiphersCache = true; }
public async Task DeleteDataAsync(string id) { await _cipherRepository.DeleteAsync(id); CachedCiphers = null; }