| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a44c3bc commit 32d7599
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,6 @@ | |||
| 1 | + | ||
| 2 | + | ||
| 3 | + | ||
| 1 | 4 | package controllers.editprofile | |
| 2 | 5 | ||
| 3 | 6 | import actions.AuthenticatedActions | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ package form | |||
| 2 | 2 | ||
| 3 | 3 | import model.Titles | |
| 4 | 4 | import play.api.data.Forms._ | |
| 5 | - import com.gu.identity.model.{PrivateFields, User, UserDates} | ||
| 5 | + import com.gu.identity.model.{Consent, PrivateFields, User, UserDates} | ||
| 6 | 6 | import idapiclient.UserUpdateDTO | |
| 7 | 7 | import play.api.data.Mapping | |
| 8 | 8 | import play.api.i18n.MessagesProvider | |
@@ -85,7 +85,8 @@ case class AccountFormData( | |||
| 85 | 85 | billingCountry = billingAddress.flatMap(x => toUpdate(x.country, currentUser.privateFields.billingCountry)), | |
| 86 | 86 | telephoneNumber = telephoneNumber.flatMap(_.telephoneNumber) | |
| 87 | 87 | )), | |
| 88 | - statusFields = Some(currentUser.statusFields.copy(allowThirdPartyProfiling = Some(allowThirdPartyProfiling))) | ||
| 88 | + statusFields = Some(currentUser.statusFields.copy(allowThirdPartyProfiling = Some(allowThirdPartyProfiling))), | ||
| 89 | + consents = Some(List(Consent(id = Consent.ProfilingOptout.id, consented = !allowThirdPartyProfiling))) | ||
| 89 | 90 | ) | |
| 90 | 91 | } | |
| 91 | 92 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,7 +47,7 @@ import scala.concurrent.Future | |||
| 47 | 47 | val httpConfiguration = HttpConfiguration.createWithDefaults() | |
| 48 | 48 | ||
| 49 | 49 | val userId: String = "123" | |
| 50 | - val user = User("test@example.com", userId, statusFields = StatusFields(receive3rdPartyMarketing = Some(true), receiveGnmMarketing = Some(true), userEmailValidated = Some(true))) | ||
| 50 | + val user = User("test@example.com", userId, statusFields = StatusFields(userEmailValidated = Some(true))) | ||
| 51 | 51 | val testAuth = ScGuU("abc", GuUCookieData(user, 0, None)) | |
| 52 | 52 | val authenticatedUser = AuthenticatedUser(user, testAuth, true) | |
| 53 | 53 | val phoneNumbers = PhoneNumbers | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,7 +50,7 @@ import scala.concurrent.Future | |||
| 50 | 50 | val httpConfiguration = HttpConfiguration.createWithDefaults() | |
| 51 | 51 | ||
| 52 | 52 | val userId: String = "123" | |
| 53 | - val user = User("test@example.com", userId, statusFields = StatusFields(receive3rdPartyMarketing = Some(true), receiveGnmMarketing = Some(true), userEmailValidated = Some(true))) | ||
| 53 | + val user = User("test@example.com", userId, statusFields = StatusFields(userEmailValidated = Some(true))) | ||
| 54 | 54 | val testAuth = ScGuU("abc", GuUCookieData(user, 0, None)) | |
| 55 | 55 | val authenticatedUser = AuthenticatedUser(user, testAuth, true) | |
| 56 | 56 | val phoneNumbers = PhoneNumbers | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,7 @@ class EmailVerificationControllerTest extends path.FreeSpec | |||
| 41 | 41 | when(api.resendEmailValidationEmail(any[Auth], any[TrackingData], any[Option[String]])) thenReturn Future.successful(Right({})) | |
| 42 | 42 | ||
| 43 | 43 | val userId: String = "123" | |
| 44 | - val user = User("test@example.com", userId, statusFields = StatusFields(receive3rdPartyMarketing = Some(true), receiveGnmMarketing = Some(true), userEmailValidated = Some(true))) | ||
| 44 | + val user = User("test@example.com", userId, statusFields = StatusFields(userEmailValidated = Some(true))) | ||
| 45 | 45 | val testAuth = ScGuU("abc", GuUCookieData(user, 0, None)) | |
| 46 | 46 | val authenticatedUser = AuthenticatedUser(user, testAuth, true) | |
| 47 | 47 | val phoneNumbers = PhoneNumbers | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,7 +42,7 @@ class FormstackControllerTest extends path.FreeSpec | |||
| 42 | 42 | val newsletterService = spy(new NewsletterService(api, requestParser, idUrlBuilder)) | |
| 43 | 43 | ||
| 44 | 44 | val userId = "123" | |
| 45 | - val user = User("test@example.com", userId, statusFields = StatusFields(receive3rdPartyMarketing = Some(true), receiveGnmMarketing = Some(true))) | ||
| 45 | + val user = User("test@example.com", userId) | ||
| 46 | 46 | val authenticatedActions = new AuthenticatedActions(authService, mock[IdApiClient], mock[IdentityUrlBuilder], controllerComponents, newsletterService, requestParser, profileRedirectService) | |
| 47 | 47 | ||
| 48 | 48 | when(authService.fullyAuthenticatedUser(MockitoMatchers.any[RequestHeader])) thenReturn Some(AuthenticatedUser(user, ScGuU("abc", GuUCookieData(user, 0, None)))) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ package com.gu | |||
| 3 | 3 | import sbt._ | |
| 4 | 4 | ||
| 5 | 5 | object Dependencies { | |
| 6 | - val identityLibVersion = "3.142" | ||
| 6 | + val identityLibVersion = "3.150" | ||
| 7 | 7 | val awsVersion = "1.11.240" | |
| 8 | 8 | val capiVersion = "12.0" | |
| 9 | 9 | val faciaVersion = "2.6.0" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments