@@ -132,7 +132,7 @@ import * as events from '../../src/events.js';
132
132
import { getGlobal } from '../../src/prebidGlobal.js' ;
133
133
import adapterManager , { gdprDataHandler } from '../../src/adapterManager.js' ;
134
134
import CONSTANTS from '../../src/constants.json' ;
135
- import { hook , module , ready as hooksReady } from '../../src/hook.js' ;
135
+ import { module , ready as hooksReady } from '../../src/hook.js' ;
136
136
import { buildEidPermissions , createEidsArray , USER_IDS_CONFIG } from './eids.js' ;
137
137
import {
138
138
getCoreStorageManager ,
@@ -159,7 +159,6 @@ import {
159
159
} from '../../src/utils.js' ;
160
160
import { getPPID as coreGetPPID } from '../../src/adserver.js' ;
161
161
import { defer , GreedyPromise } from '../../src/utils/promise.js' ;
162
- import { hasPurpose1Consent } from '../../src/utils/gpdr.js' ;
163
162
import { registerOrtbProcessor , REQUEST } from '../../src/pbjsORTB.js' ;
164
163
import { newMetrics , timedAuctionHook , useMetrics } from '../../src/utils/perfMetrics.js' ;
165
164
import { findRootDomain } from '../../src/fpd/rootDomain.js' ;
@@ -784,15 +783,6 @@ function getUserIdsAsync() {
784
783
) ;
785
784
}
786
785
787
- /**
788
- * This hook returns updated list of submodules which are allowed to do get user id based on TCF 2 enforcement rules configured
789
- */
790
- export const validateGdprEnforcement = hook ( 'sync' , function ( submodules , consentData ) {
791
- // TODO: remove the `hasValidated` check in v8. Enforcement should be OFF by default.
792
- // https://github.com/prebid/Prebid.js/issues/9766
793
- return { userIdModules : submodules , hasValidated : consentData && consentData . hasValidated } ;
794
- } , 'validateGdprEnforcement' ) ;
795
-
796
786
function populateSubmoduleId ( submodule , consentData , storedConsentData , forceRefresh ) {
797
787
// There are two submodule configuration types to handle: storage or value
798
788
// 1. storage: retrieve user id data from cookie/html storage or with the submodule's getId method
@@ -882,18 +872,11 @@ function initSubmodules(dest, submodules, consentData, forceRefresh = false) {
882
872
return [ ] ;
883
873
}
884
874
885
- // TODO: remove this check in v8 (https://github.com/prebid/Prebid.js/issues/9766)
886
- let { userIdModules, hasValidated } = validateGdprEnforcement ( submodules , consentData ) ;
887
- if ( ! hasValidated && ! hasPurpose1Consent ( consentData ) ) {
888
- logWarn ( `${ MODULE_NAME } - gdpr permission not valid for local storage or cookies, exit module` ) ;
889
- return [ ] ;
890
- }
891
-
892
875
// we always want the latest consentData stored, even if we don't execute any submodules
893
876
const storedConsentData = getStoredConsentData ( ) ;
894
877
setStoredConsentData ( consentData ) ;
895
878
896
- const initialized = userIdModules . reduce ( ( carry , submodule ) => {
879
+ const initialized = submodules . reduce ( ( carry , submodule ) => {
897
880
return submoduleMetrics ( submodule . submodule . name ) . measureTime ( 'init' , ( ) => {
898
881
try {
899
882
populateSubmoduleId ( submodule , consentData , storedConsentData , forceRefresh ) ;
0 commit comments