mirror of
https://github.com/bitwarden/ios.git
synced 2025-12-10 17:46:07 -06:00
[PM-19507] deps: Updated SDK to ce330bb (#1462)
This commit is contained in:
parent
336e8dcb5b
commit
a7c3752f29
@ -70,6 +70,7 @@ extension CipherListView {
|
||||
reprompt: cipher.reprompt,
|
||||
organizationUseTotp: cipher.organizationUseTotp,
|
||||
edit: cipher.edit,
|
||||
permissions: cipher.permissions,
|
||||
viewPassword: cipher.viewPassword,
|
||||
attachments: UInt32(cipher.attachments?.count ?? 0),
|
||||
creationDate: cipher.creationDate,
|
||||
@ -89,9 +90,11 @@ extension CipherListViewType {
|
||||
case .login:
|
||||
self = .login(
|
||||
LoginListView(
|
||||
fido2Credentials: nil,
|
||||
hasFido2: !(
|
||||
cipher.login?.fido2Credentials?.isEmpty ?? true
|
||||
),
|
||||
username: nil,
|
||||
totp: cipher.login?.totp,
|
||||
uris: cipher.login?.uris?.map { LoginUriView(loginUri: $0) }
|
||||
)
|
||||
@ -124,6 +127,7 @@ extension Cipher {
|
||||
reprompt: cipherView.reprompt,
|
||||
organizationUseTotp: cipherView.organizationUseTotp,
|
||||
edit: cipherView.edit,
|
||||
permissions: cipherView.permissions,
|
||||
viewPassword: cipherView.viewPassword,
|
||||
localData: cipherView.localData.map(LocalData.init),
|
||||
attachments: cipherView.attachments?.map(Attachment.init),
|
||||
@ -156,6 +160,7 @@ extension CipherView {
|
||||
reprompt: cipher.reprompt,
|
||||
organizationUseTotp: cipher.organizationUseTotp,
|
||||
edit: cipher.edit,
|
||||
permissions: cipher.permissions,
|
||||
viewPassword: cipher.viewPassword,
|
||||
localData: cipher.localData.map(LocalDataView.init),
|
||||
attachments: cipher.attachments?.map(AttachmentView.init),
|
||||
|
||||
@ -46,6 +46,7 @@ extension Cipher {
|
||||
organizationId: String? = nil,
|
||||
organizationUseTotp: Bool = false,
|
||||
passwordHistory: [PasswordHistory]? = nil,
|
||||
permissions: CipherPermissions? = nil,
|
||||
reprompt: BitwardenSdk.CipherRepromptType = .none,
|
||||
revisionDate: Date = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
|
||||
secureNote: SecureNote? = nil,
|
||||
@ -71,6 +72,7 @@ extension Cipher {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
@ -104,6 +106,7 @@ extension CipherView {
|
||||
organizationId: String? = nil,
|
||||
organizationUseTotp: Bool = false,
|
||||
passwordHistory: [PasswordHistoryView]? = nil,
|
||||
permissions: CipherPermissions? = nil,
|
||||
reprompt: BitwardenSdk.CipherRepromptType = .none,
|
||||
revisionDate: Date = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
|
||||
secureNote: SecureNoteView? = nil,
|
||||
@ -129,6 +132,7 @@ extension CipherView {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
@ -158,6 +162,7 @@ extension CipherView {
|
||||
organizationId: String? = nil,
|
||||
organizationUseTotp: Bool = false,
|
||||
passwordHistory: [PasswordHistoryView]? = nil,
|
||||
permissions: CipherPermissions? = nil,
|
||||
reprompt: BitwardenSdk.CipherRepromptType = .none,
|
||||
revisionDate: Date = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
|
||||
viewPassword: Bool = true
|
||||
@ -180,6 +185,7 @@ extension CipherView {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
@ -209,6 +215,7 @@ extension CipherView {
|
||||
organizationId: String? = nil,
|
||||
organizationUseTotp: Bool = false,
|
||||
passwordHistory: [PasswordHistoryView]? = nil,
|
||||
permissions: CipherPermissions? = nil,
|
||||
reprompt: BitwardenSdk.CipherRepromptType = .none,
|
||||
revisionDate: Date = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
|
||||
viewPassword: Bool = true
|
||||
@ -231,6 +238,7 @@ extension CipherView {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/bitwarden/sdk-swift",
|
||||
"state" : {
|
||||
"revision" : "94fd09f0b73367071bc033987a1962fce85f5c76"
|
||||
"revision" : "ce330bb3cb873c47041eb0e86f5c065b8799caa2"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@ import Foundation
|
||||
|
||||
/// Report with traceability about Fido2 flows.
|
||||
public struct Fido2DebuggingReport {
|
||||
var allCredentialsResult: Result<[BitwardenSdk.CipherView], Error>?
|
||||
var allCredentialsResult: Result<[BitwardenSdk.CipherListView], Error>?
|
||||
var findCredentialsResult: Result<[BitwardenSdk.CipherView], Error>?
|
||||
var getAssertionRequest: GetAssertionRequest?
|
||||
var getAssertionResult: Result<GetAssertionResult, Error>?
|
||||
@ -25,7 +25,7 @@ public struct Fido2DebuggingReportBuilder {
|
||||
report
|
||||
}
|
||||
|
||||
mutating func withAllCredentialsResult(_ result: Result<[BitwardenSdk.CipherView], Error>) {
|
||||
mutating func withAllCredentialsResult(_ result: Result<[BitwardenSdk.CipherListView], Error>) {
|
||||
report.allCredentialsResult = result
|
||||
}
|
||||
|
||||
|
||||
@ -77,6 +77,7 @@ extension CipherDetailsResponseModel {
|
||||
organizationId: cipher.organizationId,
|
||||
organizationUseTotp: cipher.organizationUseTotp,
|
||||
passwordHistory: cipher.passwordHistory?.map(CipherPasswordHistoryModel.init),
|
||||
permissions: CipherPermissionsModel(cipherPermissions: cipher.permissions),
|
||||
reprompt: BitwardenShared.CipherRepromptType(type: cipher.reprompt),
|
||||
revisionDate: cipher.revisionDate,
|
||||
secureNote: cipher.secureNote.map(CipherSecureNoteModel.init),
|
||||
@ -176,6 +177,15 @@ extension CipherPasswordHistoryModel {
|
||||
}
|
||||
}
|
||||
|
||||
extension CipherPermissionsModel {
|
||||
init?(cipherPermissions: BitwardenSdk.CipherPermissions?) {
|
||||
guard let cipherPermissions else {
|
||||
return nil
|
||||
}
|
||||
self.init(delete: cipherPermissions.delete, restore: cipherPermissions.restore)
|
||||
}
|
||||
}
|
||||
|
||||
extension CipherRepromptType {
|
||||
init(type: BitwardenSdk.CipherRepromptType) {
|
||||
switch type {
|
||||
@ -318,6 +328,7 @@ extension BitwardenSdk.Cipher {
|
||||
reprompt: BitwardenSdk.CipherRepromptType(model.reprompt),
|
||||
organizationUseTotp: model.organizationUseTotp,
|
||||
edit: model.edit,
|
||||
permissions: model.permissions.map(CipherPermissions.init),
|
||||
viewPassword: model.viewPassword,
|
||||
localData: nil,
|
||||
attachments: model.attachments?.map(Attachment.init),
|
||||
@ -366,6 +377,7 @@ extension BitwardenSdk.CipherView: @retroactive Identifiable {
|
||||
reprompt: .none,
|
||||
organizationUseTotp: false,
|
||||
edit: false,
|
||||
permissions: nil,
|
||||
viewPassword: true,
|
||||
localData: nil,
|
||||
attachments: nil,
|
||||
@ -527,6 +539,12 @@ extension BitwardenSdk.PasswordHistory {
|
||||
}
|
||||
}
|
||||
|
||||
extension BitwardenSdk.CipherPermissions {
|
||||
init(cipherPermissionsModel model: CipherPermissionsModel) {
|
||||
self.init(delete: model.delete, restore: model.restore)
|
||||
}
|
||||
}
|
||||
|
||||
extension BitwardenSdk.SecureNote {
|
||||
init(cipherSecureNoteModel model: CipherSecureNoteModel) {
|
||||
self.init(type: BitwardenSdk.SecureNoteType(type: model.type))
|
||||
|
||||
@ -162,6 +162,7 @@ class CipherViewTests: BitwardenTestCase {
|
||||
reprompt: .none,
|
||||
organizationUseTotp: false,
|
||||
edit: false,
|
||||
permissions: nil,
|
||||
viewPassword: true,
|
||||
localData: nil,
|
||||
attachments: nil,
|
||||
@ -211,6 +212,7 @@ class CipherViewTests: BitwardenTestCase {
|
||||
reprompt: .none,
|
||||
organizationUseTotp: false,
|
||||
edit: false,
|
||||
permissions: nil,
|
||||
viewPassword: true,
|
||||
localData: nil,
|
||||
attachments: nil,
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
/// API model for cipher permissions.
|
||||
///
|
||||
struct CipherPermissionsModel: Codable, Equatable {
|
||||
/// Whether `delete` permission is active.
|
||||
let delete: Bool
|
||||
|
||||
/// Whether `restore` permission is acive.
|
||||
let restore: Bool
|
||||
}
|
||||
@ -10,11 +10,20 @@ extension CipherListView {
|
||||
key: String? = nil,
|
||||
name: String = "Example",
|
||||
subtitle: String = "email@example.com",
|
||||
type: BitwardenSdk.CipherListViewType = .login(LoginListView(hasFido2: false, totp: nil, uris: nil)),
|
||||
type: BitwardenSdk.CipherListViewType = .login(
|
||||
LoginListView(
|
||||
fido2Credentials: nil,
|
||||
hasFido2: false,
|
||||
username: nil,
|
||||
totp: nil,
|
||||
uris: nil
|
||||
)
|
||||
),
|
||||
favorite: Bool = true,
|
||||
reprompt: BitwardenSdk.CipherRepromptType = .none,
|
||||
organizationUseTotp: Bool = false,
|
||||
edit: Bool = false,
|
||||
permissions: BitwardenSdk.CipherPermissions? = nil,
|
||||
viewPassword: Bool = true,
|
||||
attachments: UInt32 = 0,
|
||||
creationDate: Date = Date(),
|
||||
@ -34,6 +43,7 @@ extension CipherListView {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
attachments: attachments,
|
||||
creationDate: creationDate,
|
||||
|
||||
@ -60,6 +60,9 @@ struct CipherDetailsResponseModel: JSONResponse, Equatable {
|
||||
/// The password history for this cipher.
|
||||
let passwordHistory: [CipherPasswordHistoryModel]?
|
||||
|
||||
/// The permissions of the cipher.
|
||||
let permissions: CipherPermissionsModel?
|
||||
|
||||
/// Whether the user needs to be re-prompted for their master password prior to autofilling the
|
||||
/// cipher's password.
|
||||
@DefaultValue var reprompt: CipherRepromptType
|
||||
|
||||
@ -22,6 +22,7 @@ extension CipherDetailsResponseModel {
|
||||
organizationId: String? = nil,
|
||||
organizationUseTotp: Bool = false,
|
||||
passwordHistory: [CipherPasswordHistoryModel]? = nil,
|
||||
permissions: CipherPermissionsModel? = nil,
|
||||
reprompt: CipherRepromptType = .none,
|
||||
revisionDate: Date = Date(),
|
||||
secureNote: CipherSecureNoteModel? = nil,
|
||||
@ -48,6 +49,7 @@ extension CipherDetailsResponseModel {
|
||||
organizationId: organizationId,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
passwordHistory: passwordHistory,
|
||||
permissions: permissions,
|
||||
reprompt: reprompt,
|
||||
revisionDate: revisionDate,
|
||||
secureNote: secureNote,
|
||||
|
||||
@ -69,6 +69,7 @@ class CipherAPIServiceTests: XCTestCase { // swiftlint:disable:this type_body_le
|
||||
organizationId: nil,
|
||||
organizationUseTotp: false,
|
||||
passwordHistory: nil,
|
||||
permissions: nil,
|
||||
reprompt: .none,
|
||||
revisionDate: Date(timeIntervalSince1970: 1_691_656_425.345),
|
||||
secureNote: nil,
|
||||
@ -119,6 +120,7 @@ class CipherAPIServiceTests: XCTestCase { // swiftlint:disable:this type_body_le
|
||||
organizationId: nil,
|
||||
organizationUseTotp: false,
|
||||
passwordHistory: nil,
|
||||
permissions: nil,
|
||||
reprompt: .none,
|
||||
revisionDate: Date(timeIntervalSince1970: 1_691_656_425.345),
|
||||
secureNote: nil,
|
||||
@ -247,6 +249,7 @@ class CipherAPIServiceTests: XCTestCase { // swiftlint:disable:this type_body_le
|
||||
organizationId: nil,
|
||||
organizationUseTotp: false,
|
||||
passwordHistory: nil,
|
||||
permissions: nil,
|
||||
reprompt: .none,
|
||||
revisionDate: Date(timeIntervalSince1970: 1_691_656_425.345),
|
||||
secureNote: nil,
|
||||
@ -300,6 +303,7 @@ class CipherAPIServiceTests: XCTestCase { // swiftlint:disable:this type_body_le
|
||||
organizationId: nil,
|
||||
organizationUseTotp: false,
|
||||
passwordHistory: nil,
|
||||
permissions: nil,
|
||||
reprompt: .none,
|
||||
revisionDate: Date(timeIntervalSince1970: 1_691_656_425.345),
|
||||
secureNote: nil,
|
||||
|
||||
@ -40,18 +40,10 @@ class Fido2CredentialStoreService: Fido2CredentialStore {
|
||||
|
||||
/// Gets all the active login ciphers that have Fido2 credentials.
|
||||
/// - Returns: Array of active login ciphers that have Fido2 credentials.
|
||||
func allCredentials() async throws -> [BitwardenSdk.CipherView] {
|
||||
do {
|
||||
try await syncService.fetchSync(forceSync: false)
|
||||
} catch {
|
||||
errorReporter.log(error: error)
|
||||
}
|
||||
|
||||
return try await cipherService.fetchAllCiphers()
|
||||
.filter(\.isActiveWithFido2Credentials)
|
||||
.asyncMap { cipher in
|
||||
try await self.clientService.vault().ciphers().decrypt(cipher: cipher)
|
||||
}
|
||||
func allCredentials() async throws -> [BitwardenSdk.CipherListView] {
|
||||
try await clientService.vault().ciphers().decryptList(
|
||||
ciphers: cipherService.fetchAllCiphers().filter(\.isActiveWithFido2Credentials)
|
||||
)
|
||||
}
|
||||
|
||||
/// Finds active login ciphers that have Fido2 credentials, match the `ripId` and if `ids` is sent
|
||||
@ -62,7 +54,17 @@ class Fido2CredentialStoreService: Fido2CredentialStore {
|
||||
/// - ripId: The `ripId` to match the Fido2 credential `rpId`.
|
||||
/// - Returns: All the ciphers that matches the filter.
|
||||
func findCredentials(ids: [Data]?, ripId: String) async throws -> [BitwardenSdk.CipherView] {
|
||||
let activeCiphersWithFido2Credentials = try await allCredentials()
|
||||
do {
|
||||
try await syncService.fetchSync(forceSync: false)
|
||||
} catch {
|
||||
errorReporter.log(error: error)
|
||||
}
|
||||
|
||||
let activeCiphersWithFido2Credentials = try await cipherService.fetchAllCiphers()
|
||||
.filter(\.isActiveWithFido2Credentials)
|
||||
.asyncMap { cipher in
|
||||
try await self.clientService.vault().ciphers().decrypt(cipher: cipher)
|
||||
}
|
||||
|
||||
var result = [BitwardenSdk.CipherView]()
|
||||
for cipherView in activeCiphersWithFido2Credentials {
|
||||
@ -126,7 +128,7 @@ class DebuggingFido2CredentialStoreService: Fido2CredentialStore {
|
||||
}
|
||||
}
|
||||
|
||||
func allCredentials() async throws -> [BitwardenSdk.CipherView] {
|
||||
func allCredentials() async throws -> [BitwardenSdk.CipherListView] {
|
||||
do {
|
||||
let result = try await fido2CredentialStore.allCredentials()
|
||||
Fido2DebuggingReportBuilder.builder.withAllCredentialsResult(.success(result))
|
||||
|
||||
@ -67,7 +67,6 @@ class Fido2CredentialStoreServiceTests: BitwardenTestCase { // swiftlint:disable
|
||||
|
||||
let result = try await subject.allCredentials()
|
||||
|
||||
XCTAssertTrue(syncService.didFetchSync)
|
||||
XCTAssertTrue(result.count == 1)
|
||||
XCTAssertTrue(result[0].id == "5")
|
||||
}
|
||||
@ -94,25 +93,13 @@ class Fido2CredentialStoreServiceTests: BitwardenTestCase { // swiftlint:disable
|
||||
type: .login
|
||||
),
|
||||
])
|
||||
clientService.mockVault.clientCiphers.decryptResult = { _ in
|
||||
throw BitwardenTestError.example
|
||||
}
|
||||
clientService.mockVault.clientCiphers.decryptListError = BitwardenTestError.example
|
||||
|
||||
await assertAsyncThrows(error: BitwardenTestError.example) {
|
||||
_ = try await subject.allCredentials()
|
||||
}
|
||||
}
|
||||
|
||||
/// `.allCredentials()` throws when syncing.
|
||||
func test_allCredentials_throwsSync() async throws {
|
||||
syncService.fetchSyncResult = .failure(BitwardenTestError.example)
|
||||
|
||||
_ = try await subject.allCredentials()
|
||||
|
||||
XCTAssertFalse(errorReporter.errors.isEmpty)
|
||||
XCTAssertTrue(cipherService.fetchAllCiphersCalled)
|
||||
}
|
||||
|
||||
/// `.findCredentials(ids:ripId:)` returns the login ciphers that are active, have Fido2 credentials
|
||||
/// and match the `ripId` and the credential `ids` if any.
|
||||
func test_findCredentials() async throws {
|
||||
@ -199,6 +186,16 @@ class Fido2CredentialStoreServiceTests: BitwardenTestCase { // swiftlint:disable
|
||||
XCTAssertTrue(result.isEmpty)
|
||||
}
|
||||
|
||||
/// `.findCredentials(ids:ripId)` throws when syncing.
|
||||
func test_findCredentials_throwsSync() async throws {
|
||||
syncService.fetchSyncResult = .failure(BitwardenTestError.example)
|
||||
|
||||
_ = try await subject.findCredentials(ids: nil, ripId: "something")
|
||||
|
||||
XCTAssertFalse(errorReporter.errors.isEmpty)
|
||||
XCTAssertTrue(cipherService.fetchAllCiphersCalled)
|
||||
}
|
||||
|
||||
/// `.findCredentials(ids:ripId:)` throws when fetching ciphers..
|
||||
func test_findCredentials_throwsWhenFetchingCipher() async throws {
|
||||
cipherService.fetchAllCiphersResult = .failure(BitwardenTestError.example)
|
||||
|
||||
@ -70,6 +70,7 @@ extension CipherListView {
|
||||
reprompt: cipher.reprompt,
|
||||
organizationUseTotp: cipher.organizationUseTotp,
|
||||
edit: cipher.edit,
|
||||
permissions: cipher.permissions,
|
||||
viewPassword: cipher.viewPassword,
|
||||
attachments: UInt32(cipher.attachments?.count ?? 0),
|
||||
creationDate: cipher.creationDate,
|
||||
@ -89,9 +90,11 @@ extension CipherListViewType {
|
||||
case .login:
|
||||
self = .login(
|
||||
LoginListView(
|
||||
fido2Credentials: nil,
|
||||
hasFido2: !(
|
||||
cipher.login?.fido2Credentials?.isEmpty ?? true
|
||||
),
|
||||
username: nil,
|
||||
totp: cipher.login?.totp,
|
||||
uris: cipher.login?.uris?.map { LoginUriView(loginUri: $0) }
|
||||
)
|
||||
@ -124,6 +127,7 @@ extension Cipher {
|
||||
reprompt: cipherView.reprompt,
|
||||
organizationUseTotp: cipherView.organizationUseTotp,
|
||||
edit: cipherView.edit,
|
||||
permissions: cipherView.permissions,
|
||||
viewPassword: cipherView.viewPassword,
|
||||
localData: cipherView.localData.map(LocalData.init),
|
||||
attachments: cipherView.attachments?.map(Attachment.init),
|
||||
@ -156,6 +160,7 @@ extension CipherView {
|
||||
reprompt: cipher.reprompt,
|
||||
organizationUseTotp: cipher.organizationUseTotp,
|
||||
edit: cipher.edit,
|
||||
permissions: cipher.permissions,
|
||||
viewPassword: cipher.viewPassword,
|
||||
localData: cipher.localData.map(LocalDataView.init),
|
||||
attachments: cipher.attachments?.map(AttachmentView.init),
|
||||
|
||||
@ -5,7 +5,7 @@ import Foundation
|
||||
|
||||
class MockFido2CredentialStore: Fido2CredentialStore {
|
||||
var findCredentialsResult: Result<[BitwardenSdk.CipherView], Error> = .success([])
|
||||
var allCredentialsResult: Result<[BitwardenSdk.CipherView], Error> = .success([])
|
||||
var allCredentialsResult: Result<[BitwardenSdk.CipherListView], Error> = .success([])
|
||||
var saveCredentialCalled = false
|
||||
var saveCredentialError: (any Error)?
|
||||
|
||||
@ -13,7 +13,7 @@ class MockFido2CredentialStore: Fido2CredentialStore {
|
||||
try findCredentialsResult.get()
|
||||
}
|
||||
|
||||
func allCredentials() async throws -> [BitwardenSdk.CipherView] {
|
||||
func allCredentials() async throws -> [BitwardenSdk.CipherListView] {
|
||||
try allCredentialsResult.get()
|
||||
}
|
||||
|
||||
|
||||
@ -91,6 +91,7 @@ class MockClientCiphers: ClientCiphersProtocol {
|
||||
}
|
||||
|
||||
var decryptFido2CredentialsResult = [BitwardenSdk.Fido2CredentialView]()
|
||||
var decryptListError: Error?
|
||||
var encryptCipherResult: Result<Cipher, Error>?
|
||||
var encryptError: Error?
|
||||
var encryptedCiphers = [CipherView]()
|
||||
@ -111,7 +112,10 @@ class MockClientCiphers: ClientCiphersProtocol {
|
||||
}
|
||||
|
||||
func decryptList(ciphers: [Cipher]) throws -> [CipherListView] {
|
||||
ciphers.map(CipherListView.init)
|
||||
if let decryptListError {
|
||||
throw decryptListError
|
||||
}
|
||||
return ciphers.map(CipherListView.init)
|
||||
}
|
||||
|
||||
func encrypt(cipherView: CipherView) throws -> Cipher {
|
||||
|
||||
@ -46,6 +46,7 @@ extension Cipher {
|
||||
organizationId: String? = nil,
|
||||
organizationUseTotp: Bool = false,
|
||||
passwordHistory: [PasswordHistory]? = nil,
|
||||
permissions: CipherPermissions? = nil,
|
||||
reprompt: BitwardenSdk.CipherRepromptType = .none,
|
||||
revisionDate: Date = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
|
||||
secureNote: SecureNote? = nil,
|
||||
@ -71,6 +72,7 @@ extension Cipher {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
@ -104,6 +106,7 @@ extension CipherView {
|
||||
organizationId: String? = nil,
|
||||
organizationUseTotp: Bool = false,
|
||||
passwordHistory: [PasswordHistoryView]? = nil,
|
||||
permissions: CipherPermissions? = nil,
|
||||
reprompt: BitwardenSdk.CipherRepromptType = .none,
|
||||
revisionDate: Date = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
|
||||
secureNote: SecureNoteView? = nil,
|
||||
@ -129,6 +132,7 @@ extension CipherView {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
@ -158,6 +162,7 @@ extension CipherView {
|
||||
organizationId: String? = nil,
|
||||
organizationUseTotp: Bool = false,
|
||||
passwordHistory: [PasswordHistoryView]? = nil,
|
||||
permissions: CipherPermissions? = nil,
|
||||
reprompt: BitwardenSdk.CipherRepromptType = .none,
|
||||
revisionDate: Date = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
|
||||
viewPassword: Bool = true
|
||||
@ -180,6 +185,7 @@ extension CipherView {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
@ -209,6 +215,7 @@ extension CipherView {
|
||||
organizationId: String? = nil,
|
||||
organizationUseTotp: Bool = false,
|
||||
passwordHistory: [PasswordHistoryView]? = nil,
|
||||
permissions: CipherPermissions? = nil,
|
||||
reprompt: BitwardenSdk.CipherRepromptType = .none,
|
||||
revisionDate: Date = Date(year: 2023, month: 11, day: 5, hour: 9, minute: 41),
|
||||
viewPassword: Bool = true
|
||||
@ -231,6 +238,7 @@ extension CipherView {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
|
||||
@ -44,6 +44,7 @@ class AddItemStateTests: XCTestCase {
|
||||
- organizationId: Optional<String>.none
|
||||
- organizationUseTotp: false
|
||||
- passwordHistory: Optional<Array<PasswordHistoryView>>.none
|
||||
- permissions: Optional<CipherPermissions>.none
|
||||
- reprompt: CipherRepromptType.none
|
||||
- revisionDate: 2023-10-20T00:00:00Z
|
||||
- secureNote: Optional<SecureNoteView>.none
|
||||
@ -105,6 +106,7 @@ class AddItemStateTests: XCTestCase {
|
||||
- organizationId: Optional<String>.none
|
||||
- organizationUseTotp: false
|
||||
- passwordHistory: Optional<Array<PasswordHistoryView>>.none
|
||||
- permissions: Optional<CipherPermissions>.none
|
||||
- reprompt: CipherRepromptType.password
|
||||
- revisionDate: 2023-09-01T00:00:00Z
|
||||
- secureNote: Optional<SecureNoteView>.none
|
||||
|
||||
@ -421,6 +421,7 @@ extension CipherItemState {
|
||||
reprompt: isMasterPasswordRePromptOn ? .password : .none,
|
||||
organizationUseTotp: false,
|
||||
edit: true,
|
||||
permissions: nil,
|
||||
viewPassword: true,
|
||||
localData: nil,
|
||||
attachments: nil,
|
||||
|
||||
@ -25,6 +25,7 @@ extension Cipher {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
@ -60,6 +61,7 @@ extension Cipher {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
|
||||
@ -193,6 +193,7 @@ extension CipherView {
|
||||
reprompt: addEditState.isMasterPasswordRePromptOn ? .password : .none,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
@ -342,6 +343,7 @@ extension CipherView {
|
||||
reprompt: reprompt,
|
||||
organizationUseTotp: organizationUseTotp,
|
||||
edit: edit,
|
||||
permissions: permissions,
|
||||
viewPassword: viewPassword,
|
||||
localData: localData,
|
||||
attachments: attachments,
|
||||
|
||||
@ -5,6 +5,11 @@
|
||||
set -euo pipefail
|
||||
|
||||
if [ "$CONFIGURATION" = "Debug" ]; then
|
||||
# Add the homebrew path for Apple silicon since it's not in Xcode's path.
|
||||
if [[ ! "$PATH" =~ "/opt/homebrew/bin" ]]; then
|
||||
PATH="/opt/homebrew/bin:$PATH"
|
||||
fi
|
||||
|
||||
mint run LicensePlist license-plist \
|
||||
--config-path .license-plist-bwa.yml
|
||||
fi
|
||||
|
||||
@ -19,7 +19,7 @@ settings:
|
||||
packages:
|
||||
BitwardenSdk:
|
||||
url: https://github.com/bitwarden/sdk-swift
|
||||
revision: 94fd09f0b73367071bc033987a1962fce85f5c76
|
||||
revision: ce330bb3cb873c47041eb0e86f5c065b8799caa2
|
||||
branch: unstable
|
||||
Firebase:
|
||||
url: https://github.com/firebase/firebase-ios-sdk
|
||||
|
||||
@ -23,7 +23,7 @@ include:
|
||||
packages:
|
||||
BitwardenSdk:
|
||||
url: https://github.com/bitwarden/sdk-swift
|
||||
revision: 94fd09f0b73367071bc033987a1962fce85f5c76
|
||||
revision: ce330bb3cb873c47041eb0e86f5c065b8799caa2
|
||||
branch: unstable
|
||||
Firebase:
|
||||
url: https://github.com/firebase/firebase-ios-sdk
|
||||
|
||||
@ -24,7 +24,7 @@ include:
|
||||
packages:
|
||||
BitwardenSdk:
|
||||
url: https://github.com/bitwarden/sdk-swift
|
||||
revision: 94fd09f0b73367071bc033987a1962fce85f5c76
|
||||
revision: ce330bb3cb873c47041eb0e86f5c065b8799caa2
|
||||
branch: unstable
|
||||
Firebase:
|
||||
url: https://github.com/firebase/firebase-ios-sdk
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user