Fixed count (php 7.2) issue across JCB. Improved the setModelExportMethod method in the compiler to now work as a setGetItemsModelMethod instead. Added more strict permissional implementation per/field across the export methods of JCB.

This commit is contained in:
2019-09-05 23:12:56 +02:00
parent 3cbe21f57d
commit e3f22d631c
60 changed files with 623 additions and 247 deletions

View File

@ -93,9 +93,15 @@ class ComponentbuilderModelClass_extendings extends JModelList
// set values to display correctly.
if (ComponentbuilderHelper::checkArray($items))
{
// Get the user object if not set.
if (!isset($user) || !ComponentbuilderHelper::checkObject($user))
{
$user = JFactory::getUser();
}
foreach ($items as $nr => &$item)
{
$access = (JFactory::getUser()->authorise('class_extends.access', 'com_componentbuilder.class_extends.' . (int) $item->id) && JFactory::getUser()->authorise('class_extends.access', 'com_componentbuilder'));
// Remove items the user can't access.
$access = ($user->authorise('class_extends.access', 'com_componentbuilder.class_extends.' . (int) $item->id) && $user->authorise('class_extends.access', 'com_componentbuilder'));
if (!$access)
{
unset($items[$nr]);