Work on permissions and code clean up

This commit is contained in:
Scott Idem
2024-11-22 10:44:12 -05:00
parent 42aa9d356f
commit 6a79cb165d
2 changed files with 18 additions and 1 deletions

View File

@@ -146,6 +146,13 @@ export async function get_ae_obj_li_for_obj_id_crud_v2(
console.log('Endpoint:', endpoint);
}
// We need to remove a few parameters from the params object that are not allowed.
delete params['qry__enabled'];
delete params['qry__hidden'];
delete params['qry__limit'];
delete params['qry__offset'];
if (for_obj_type) {
params['for_obj_type'] = for_obj_type;
}
@@ -163,7 +170,9 @@ export async function get_ae_obj_li_for_obj_id_crud_v2(
params['exp_alt'] = 'alt'; // Use alternate export table or view name
}
/* Need to deal with inc params here */
// Need to deal with inc params here???
let allowed_enabled_list = ['all', 'enabled', 'not_enabled']
if (allowed_enabled_list.includes(enabled) ) {

View File

@@ -37,10 +37,18 @@ if (browser) {
$ae_loc.access_type = 'authenticated';
$ae_loc.authenticated_access = true;
$ae_loc.anonymous_access = true;
// Resetting these just in case...
$idaa_loc.bb.qry__hidden == 'not_hidden';
$idaa_loc.bb.qry__enabled == 'enabled';
} else if ($ae_loc.iframe) {
$ae_loc.access_type = 'anonymous';
$ae_loc.authenticated_access = false;
$ae_loc.anonymous_access = true;
// Resetting these just in case...
$idaa_loc.bb.qry__hidden == 'not_hidden';
$idaa_loc.bb.qry__enabled == 'enabled';
}
// NOTE: Check if the novi_uuid is in the novi_admin_li list