Skip to content

Commit 846669a

Browse files
PM-12243: Fix organization permissions JSON decoding errors for removed properties (#934)
1 parent 6eeaa1b commit 846669a

File tree

2 files changed

+3
-75
lines changed

2 files changed

+3
-75
lines changed

BitwardenShared/Core/Vault/Models/API/Fixtures/Permissions+Fixtures.swift

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,12 @@
22

33
extension Permissions {
44
static func fixture(
5-
accessEventLogs: Bool = false,
6-
accessImportExport: Bool = false,
7-
accessReports: Bool = false,
8-
createNewCollections: Bool = false,
9-
deleteAnyCollection: Bool = false,
10-
deleteAssignedCollections: Bool = false,
11-
editAnyCollection: Bool = false,
12-
editAssignedCollections: Bool = false,
13-
manageGroups: Bool = false,
145
managePolicies: Bool = false,
15-
manageResetPassword: Bool = false,
16-
manageScim: Bool = false,
17-
manageSso: Bool = false,
18-
manageUsers: Bool = false
6+
manageResetPassword: Bool = false
197
) -> Permissions {
208
self.init(
21-
accessEventLogs: accessEventLogs,
22-
accessImportExport: accessImportExport,
23-
accessReports: accessReports,
24-
createNewCollections: createNewCollections,
25-
deleteAnyCollection: deleteAnyCollection,
26-
deleteAssignedCollections: deleteAssignedCollections,
27-
editAnyCollection: editAnyCollection,
28-
editAssignedCollections: editAssignedCollections,
29-
manageGroups: manageGroups,
309
managePolicies: managePolicies,
31-
manageResetPassword: manageResetPassword,
32-
manageScim: manageScim,
33-
manageSso: manageSso,
34-
manageUsers: manageUsers
10+
manageResetPassword: manageResetPassword
3511
)
3612
}
3713
}

BitwardenShared/Core/Vault/Models/API/Permissions.swift

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,68 +3,20 @@
33
struct Permissions: Codable, Equatable, Hashable {
44
// MARK: Properties
55

6-
/// Whether the user can access event logs.
7-
let accessEventLogs: Bool
8-
9-
/// Whether the user can access import and export.
10-
let accessImportExport: Bool
11-
12-
/// Whether the user can access reports.
13-
let accessReports: Bool
14-
15-
/// Whether the user can create new collections.
16-
let createNewCollections: Bool
17-
18-
/// Whether the user can delete any collection.
19-
let deleteAnyCollection: Bool
20-
21-
/// Whether the user can delete assigned collections.
22-
let deleteAssignedCollections: Bool
23-
24-
/// Whether the user can edit any collection.
25-
let editAnyCollection: Bool
26-
27-
/// Whether the user can edit assigned collections.
28-
let editAssignedCollections: Bool
29-
30-
/// Whether the user can manage groups.
31-
let manageGroups: Bool
32-
336
/// Whether the user can manage policies.
347
let managePolicies: Bool
358

369
/// Whether the user can manage reset password.
3710
let manageResetPassword: Bool
38-
39-
/// Whether the user can manage SCIM.
40-
let manageScim: Bool
41-
42-
/// Whether the user can manage SSO.
43-
let manageSso: Bool
44-
45-
/// Whether the user can manager users.
46-
let manageUsers: Bool
4711
}
4812

4913
extension Permissions {
5014
/// Initialize `Permissions` with default values.
5115
///
5216
init() {
5317
self.init(
54-
accessEventLogs: false,
55-
accessImportExport: false,
56-
accessReports: false,
57-
createNewCollections: false,
58-
deleteAnyCollection: false,
59-
deleteAssignedCollections: false,
60-
editAnyCollection: false,
61-
editAssignedCollections: false,
62-
manageGroups: false,
6318
managePolicies: false,
64-
manageResetPassword: false,
65-
manageScim: false,
66-
manageSso: false,
67-
manageUsers: false
19+
manageResetPassword: false
6820
)
6921
}
7022
}

0 commit comments

Comments
 (0)