mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[CST-15593] go back to orejime-anonymous cookie
This commit is contained in:
@@ -54,9 +54,9 @@ before(() => {
|
||||
|
||||
// Runs once before the first test in each "block"
|
||||
beforeEach(() => {
|
||||
// Pre-agree to all Orejime cookies by setting the orejime cookie
|
||||
// Pre-agree to all Orejime cookies by setting the orejime-anonymous cookie
|
||||
// This just ensures it doesn't get in the way of matching other objects in the page.
|
||||
cy.setCookie('orejime', '{%22authentication%22:true%2C%22preferences%22:true%2C%22acknowledgement%22:true%2C%22google-analytics%22:true%2C%22google-recaptcha%22:true}');
|
||||
cy.setCookie('orejime-anonymous', '{%22authentication%22:true%2C%22preferences%22:true%2C%22acknowledgement%22:true%2C%22google-analytics%22:true%2C%22google-recaptcha%22:true}');
|
||||
|
||||
// Remove any CSRF cookies saved from prior tests
|
||||
cy.clearCookie(DSPACE_XSRF_COOKIE);
|
||||
|
@@ -105,7 +105,7 @@ export class GoogleRecaptchaService {
|
||||
tap(([recaptchaVersionRD, recaptchaModeRD, recaptchaKeyRD]) => {
|
||||
|
||||
if (
|
||||
this.cookieService.get('orejime') && this.cookieService.get('orejime')[CAPTCHA_NAME] &&
|
||||
this.cookieService.get('orejime-anonymous') && this.cookieService.get('orejime-anonymous')[CAPTCHA_NAME] &&
|
||||
recaptchaKeyRD.hasSucceeded && recaptchaVersionRD.hasSucceeded &&
|
||||
isNotEmpty(recaptchaVersionRD.payload?.values) && isNotEmpty(recaptchaKeyRD.payload?.values)
|
||||
) {
|
||||
|
@@ -247,7 +247,7 @@ export class RegisterEmailFormComponent implements OnDestroy, OnInit {
|
||||
* Return true if the user has accepted the required cookies for reCaptcha
|
||||
*/
|
||||
isRecaptchaCookieAccepted(): boolean {
|
||||
const orejimeAnonymousCookie = this.cookieService.get('orejime');
|
||||
const orejimeAnonymousCookie = this.cookieService.get('orejime-anonymous');
|
||||
return isNotEmpty(orejimeAnonymousCookie) ? orejimeAnonymousCookie[CAPTCHA_NAME] : false;
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@ import { NativeWindowRef } from '../../core/services/window.service';
|
||||
*/
|
||||
export const HAS_AGREED_END_USER = 'dsHasAgreedEndUser';
|
||||
|
||||
export const ANONYMOUS_STORAGE_NAME_OREJIME = 'orejime';
|
||||
export const ANONYMOUS_STORAGE_NAME_OREJIME = 'orejime-anonymous';
|
||||
|
||||
export const GOOGLE_ANALYTICS_OREJIME_KEY = 'google-analytics';
|
||||
|
||||
@@ -26,7 +26,7 @@ export const GOOGLE_ANALYTICS_OREJIME_KEY = 'google-analytics';
|
||||
|
||||
export function getOrejimeConfiguration(_window: NativeWindowRef): any {
|
||||
return {
|
||||
storageName: ANONYMOUS_STORAGE_NAME_OREJIME,
|
||||
cookieName: ANONYMOUS_STORAGE_NAME_OREJIME,
|
||||
|
||||
privacyPolicy: './info/privacy',
|
||||
|
||||
|
Reference in New Issue
Block a user