-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#2718] Migrate cookie consent from Klaro to Orejime #3199
Merged
+599
−643
Merged
Changes from 10 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8406905
[CST-15593] migrate from klaro to orejime
7966efc
Merge remote-tracking branch 'origin/main' into task/main/CST-15593
a9da80c
[CST-15593] run npm i for orejime
58c5d74
[CST-15593] fix orejime startup error
80e1dae
[CST-15593] allow orejime to start if privacy statement is disabled
e2dc89c
[CST-15595] fix tests
a2193a1
Merge branch 'main' into task/main/CST-15593
ad7bbb8
Merge remote-tracking branch 'github/main' into task/main/CST-15593
8c70ee8
Merge branch 'main' into task/main/CST-15593
9eaaab5
Merge remote-tracking branch 'github/main' into task/main/CST-15593
0ab4d90
[CST-15593] fix orejime cookie name, a11y issues and package-lock
e516ae8
[CST-15593] go back to orejime-anonymous cookie
6257718
[CST-15593] improve tests reliability
5bd99a1
[CST-15593] fix authenticated orejime cookie encoding
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ import { | |
import { Registration } from '../core/shared/registration.model'; | ||
import { AlertComponent } from '../shared/alert/alert.component'; | ||
import { AlertType } from '../shared/alert/alert-type'; | ||
import { KlaroService } from '../shared/cookies/klaro.service'; | ||
import { OrejimeService } from '../shared/cookies/orejime.service'; | ||
import { isNotEmpty } from '../shared/empty.util'; | ||
import { GoogleRecaptchaComponent } from '../shared/google-recaptcha/google-recaptcha.component'; | ||
import { NotificationsService } from '../shared/notifications/notifications.service'; | ||
|
@@ -126,7 +126,7 @@ export class RegisterEmailFormComponent implements OnDestroy, OnInit { | |
private configService: ConfigurationDataService, | ||
public googleRecaptchaService: GoogleRecaptchaService, | ||
public cookieService: CookieService, | ||
@Optional() public klaroService: KlaroService, | ||
@Optional() public orejimeService: OrejimeService, | ||
private changeDetectorRef: ChangeDetectorRef, | ||
private notificationsService: NotificationsService, | ||
) { | ||
|
@@ -247,8 +247,8 @@ export class RegisterEmailFormComponent implements OnDestroy, OnInit { | |
* Return true if the user has accepted the required cookies for reCaptcha | ||
*/ | ||
isRecaptchaCookieAccepted(): boolean { | ||
const klaroAnonymousCookie = this.cookieService.get('klaro-anonymous'); | ||
return isNotEmpty(klaroAnonymousCookie) ? klaroAnonymousCookie[CAPTCHA_NAME] : false; | ||
const orejimeAnonymousCookie = this.cookieService.get('orejime-anonymous'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, the anonymous cookie seems to be named |
||
return isNotEmpty(orejimeAnonymousCookie) ? orejimeAnonymousCookie[CAPTCHA_NAME] : false; | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the anonymous
orejime
cookie is just named "orejime" (at least that's what I'm seeing in my cookies locally).So, this line may need to replace 'orejime-anonymous' with 'orejime'. That might also fix the tests failures you are seeing, as I think these e2e tests are setting the wrong cookie, and the test failures are caused by the Orejime cookie popup getting in front of the page content.