File tree Expand file tree Collapse file tree 1 file changed +8
-19
lines changed Expand file tree Collapse file tree 1 file changed +8
-19
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,7 @@ extension CIABEligibilityChecker: CIABEligibilityCheckerProtocol {
2020 }
2121
2222 func isSiteCIAB( _ site: Site ) -> Bool {
23- /// Temp logic
24- /// If site name contains either `garden` or `ciab` then it's considered a CIAB site
25- return isCIABSupportedForBuildEnvironment && CIABUnlockingSiteNameSubstrings . allCases. contains {
26- site. name. lowercased ( ) . contains ( $0. rawValue)
27- }
23+ return site. isCIAB
2824 }
2925
3026 func isFeatureSupportedForCurrentSite( _ feature: CIABAffectedFeature ) -> Bool {
@@ -39,22 +35,15 @@ extension CIABEligibilityChecker: CIABEligibilityCheckerProtocol {
3935 }
4036}
4137
42- // MARK: - Temporary constants for CIAB identifying logic
38+ // MARK: - Site checks
4339
44- fileprivate extension CIABEligibilityChecker {
45- enum CIABUnlockingSiteNameSubstrings : String , CaseIterable {
46- case garden
47- case ciab
40+ private extension Site {
41+ var isCIAB : Bool {
42+ return isGarden && gardenName == GardenName . commerce. rawValue
4843 }
4944}
5045
51- // MARK: - Temporary environment checks
52-
53- import enum WooFoundationCore. BuildConfiguration
54-
55- private extension CIABEligibilityChecker {
56- var isCIABSupportedForBuildEnvironment : Bool {
57- let buildConfig = BuildConfiguration . current
58- return buildConfig == . localDeveloper || buildConfig == . alpha
59- }
46+ private enum GardenName : String {
47+ /// Garden name for CIAB sites
48+ case commerce
6049}
You can’t perform that action at this time.
0 commit comments