//if ($resource_permissions !== 0) $role_passed = count($action);
this line in each section seem to just break the thing
so i commented out
and
if ($permission->action == 'all' && in_array($permission->resource, $resource) /*&& $permission->item_id === $resource_id*/) {
seems that our permission checkboxes is not up to date with this code
we only give permission for page type but when the permission is requested it has a resource_id but our permission does not
so we need to bypass that line
//if ($resource_permissions !== 0) $role_passed = count($action);
this line in each section seem to just break the thing so i commented out andif ($permission->action == 'all' && in_array($permission->resource, $resource) /*&& $permission->item_id === $resource_id*/) {
seems that our permission checkboxes is not up to date with this code we only give permission for page type but when the permission is requested it has a resource_id but our permission does not so we need to bypass that line