Skip to content

Commit 5fd498a

Browse files
committed
Remove redundant role check
1 parent 8979b80 commit 5fd498a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

WooCommerce/Classes/ViewRelated/JetpackSetup/JetpackSetupCoordinator.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,7 @@ private extension JetpackSetupCoordinator {
320320

321321
@MainActor
322322
func fetchJetpackConnectionData() async throws -> JetpackConnectionData {
323-
/// Jetpack setup will fail anyway without admin role, so check that first.
324-
let roles = stores.sessionManager.defaultRoles
325-
guard roles.contains(.administrator) else {
326-
throw JetpackCheckError.missingPermission
327-
}
328-
return try await withCheckedThrowingContinuation { continuation in
323+
try await withCheckedThrowingContinuation { continuation in
329324
let action = JetpackConnectionAction.fetchJetpackConnectionData { result in
330325
continuation.resume(with: result)
331326
}

0 commit comments

Comments
 (0)