update 2024-05-16 15:19:46

This commit is contained in:
Robot 2024-05-16 15:19:46 +02:00
parent 42310f5d44
commit 8f0a6aa0b1
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
4 changed files with 30 additions and 6 deletions

View File

@ -38,9 +38,20 @@ class Permissions
? json_decode((string) $item->addpermissions, true) : null; ? json_decode((string) $item->addpermissions, true) : null;
if (ArrayHelper::check($item->addpermissions)) if (ArrayHelper::check($item->addpermissions))
{
if (isset($item->addpermissions["action"]) && is_array($item->addpermissions["action"])
&& isset($item->addpermissions["implementation"]) && is_array($item->addpermissions["implementation"]))
{
foreach ($item->addpermissions["action"] as $k => $action)
{
$item->permissions[] = ['action' => $action, 'implementation' => $item->addpermissions["implementation"][$k]];
}
}
else
{ {
$item->permissions = array_values($item->addpermissions); $item->permissions = array_values($item->addpermissions);
} }
}
unset($item->addpermissions); unset($item->addpermissions);
} }

View File

@ -13,9 +13,20 @@
? json_decode((string) $item->addpermissions, true) : null; ? json_decode((string) $item->addpermissions, true) : null;
if (ArrayHelper::check($item->addpermissions)) if (ArrayHelper::check($item->addpermissions))
{
if (isset($item->addpermissions["action"]) && is_array($item->addpermissions["action"])
&& isset($item->addpermissions["implementation"]) && is_array($item->addpermissions["implementation"]))
{
foreach ($item->addpermissions["action"] as $k => $action)
{
$item->permissions[] = ['action' => $action, 'implementation' => $item->addpermissions["implementation"][$k]];
}
}
else
{ {
$item->permissions = array_values($item->addpermissions); $item->permissions = array_values($item->addpermissions);
} }
}
unset($item->addpermissions); unset($item->addpermissions);
} }

View File

@ -460,7 +460,7 @@ final class AccessSections
} }
} }
$this->permission ->set( $this->permission->set(
$custom_admin_view, $customAdminCode, $customAdminCode, $custom_admin_view, $customAdminCode, $customAdminCode,
$menuControllers, 'customAdmin' $menuControllers, 'customAdmin'
); );
@ -661,7 +661,8 @@ final class AccessSections
} }
} }
} }
$this->permission ->set(
$this->permission->set(
$view, $nameView, $nameViews, $menuControllers $view, $nameView, $nameViews, $menuControllers
); );
} }

View File

@ -420,7 +420,7 @@
} }
} }
$this->permission ->set( $this->permission->set(
$custom_admin_view, $customAdminCode, $customAdminCode, $custom_admin_view, $customAdminCode, $customAdminCode,
$menuControllers, 'customAdmin' $menuControllers, 'customAdmin'
); );
@ -621,7 +621,8 @@
} }
} }
} }
$this->permission ->set(
$this->permission->set(
$view, $nameView, $nameViews, $menuControllers $view, $nameView, $nameViews, $menuControllers
); );
} }