More work on the site permissions.
This commit is contained in:
@@ -118,12 +118,31 @@ if ($ae_loc.site_cfg_json.slct__sponsorship_cfg_id) {
|
||||
|
||||
if ($ae_loc.allow_access && !$ae_loc.key_checked) {
|
||||
console.log(`PASS: The access key was checked earlier.`);
|
||||
|
||||
// allow_access should equal true or the access key.
|
||||
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 ($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.`);
|
||||
} else {
|
||||
console.log(`FAIL: The access key was checked earlier, but just now failed.`);
|
||||
if ($ae_loc.trusted_access) {
|
||||
console.log(`FAIL: The access key was checked earlier and failed, but we have trusted access.`);
|
||||
$ae_loc.allow_access = true;
|
||||
} else {
|
||||
$ae_loc.allow_access = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// This means this site and domain do not require an access key.
|
||||
// Do nothing to change the allow_access here at this time.
|
||||
}
|
||||
} else if ($ae_loc.allow_access && $ae_loc.key_checked) {
|
||||
console.log(`PASS: The access key was checked earlier and we just now checked the key.`);
|
||||
} else if (!$ae_loc.allow_access && $ae_loc.key_checked) {
|
||||
console.log(`FAIL: The access key was checked earlier and failed.`);
|
||||
if ($ae_loc.administrator_access) {
|
||||
console.log(`FAIL: The access key was checked earlier and failed, but we have administrator access.`);
|
||||
if ($ae_loc.trusted_access) {
|
||||
console.log(`FAIL: The access key was checked earlier and failed, but we have trusted access.`);
|
||||
$ae_loc.allow_access = true;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user