Skip to content

Commit

Permalink
Give Feast access to supporter members
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertbates committed Jan 28, 2025
1 parent 3aeafef commit 6ac4218
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions membership-attribute-service/app/models/FeastApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import org.joda.time.LocalDate

object FeastApp {

val FeastFullLaunchDate = LocalDate.parse("2024-07-10")

object IosSubscriptionGroupIds {
// Subscription group ids are used by the app to tell the app store which subscription option to show to the user
val IntroductoryOffer = "21396030"
Expand All @@ -17,11 +15,10 @@ object FeastApp {
val IntroductoryOffer = "initial_supporter_launch_offer"
}

private def isBeforeFeastLaunch(dt: LocalDate): Boolean = dt.isBefore(FeastFullLaunchDate)

def shouldGetFeastAccess(attributes: Attributes): Boolean =
attributes.isPartnerTier ||
attributes.isPatronTier ||
attributes.isSupporterTier ||
attributes.isGuardianPatron ||
attributes.digitalSubscriberHasActivePlan ||
attributes.isSupporterPlus ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AttributeControllerTest extends Specification with AfterAll with Idiomatic
implicit val as: ActorSystem = ActorSystem("test")

private val dateTimeInTheFuture = DateTime.now().plusDays(1)
private val dateBeforeFeastLaunch = FeastApp.FeastFullLaunchDate.minusDays(1)
private val dateBeforeFeastLaunch = LocalDate.parse("2024-07-10")
private val validUserId = "1"
private val userWithoutAttributesUserId = "2"
private val userWithRecurringContributionUserId = "3"
Expand Down

0 comments on commit 6ac4218

Please sign in to comment.