More work on the initial loading.
This commit is contained in:
@@ -191,16 +191,26 @@ if ($ae_loc.site_cfg_json.slct__sponsorship_cfg_id) {
|
||||
|
||||
// Updated 2024-11-21
|
||||
if ($ae_loc.site_access_key || $ae_loc.site_domain_access_key) {
|
||||
console.log(`We need to do a current check against the allow_access value.`);
|
||||
if (log_lvl > 1) {
|
||||
console.log(`We need to do a current check against the allow_access value. site key: ${$ae_loc.site_access_key}, domain key: ${$ae_loc.site_domain_access_key}`);
|
||||
}
|
||||
|
||||
// $ae_loc.allow_access is set to they key if passed in the URL. It is set to true if they are just "trusted".
|
||||
if ($ae_loc.site_access_key === $ae_loc.allow_access || $ae_loc.site_domain_access_key === $ae_loc.allow_access) {
|
||||
console.log(`PASS: The access key was checked earlier and we just now checked the key.`);
|
||||
if (log_lvl > 1) {
|
||||
console.log(`PASS: The allow_access was checked earlier and just now checked against the site or domain key.`);
|
||||
}
|
||||
} else {
|
||||
console.log(`FAIL: The access key was checked earlier, but just now failed.`);
|
||||
// console.log(`FAIL: The access key was checked earlier, but just now failed. Checking if they are trusted...`);
|
||||
if ($ae_loc.trusted_access) {
|
||||
console.log(`FAIL: The access key was checked earlier and failed, but we have trusted access.`);
|
||||
if (log_lvl > 1) {
|
||||
console.log(`PASS: The access key was checked and failed, but we have trusted access.`);
|
||||
}
|
||||
$ae_loc.allow_access = true;
|
||||
} else {
|
||||
if (log_lvl) {
|
||||
console.log(`FAIL: The site and domain access key was checked and failed, and we do not have trusted access.`);
|
||||
}
|
||||
$ae_loc.allow_access = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user