We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1269edd commit 1bd6a2aCopy full SHA for 1bd6a2a
1 file changed
hook.php
@@ -732,11 +732,18 @@ function plugin_formcreator_hook_update_profile(CommonDBTM $item) {
732
}
733
$dashboardRight = new DashboardRight();
734
if ($item->fields['interface'] == 'helpdesk') {
735
- $dashboardRight->add([
+ $dashboardRight->getFromDBByCrit([
736
'dashboards_dashboards_id' => $dashboard->fields['id'],
737
'itemtype' => Profile::getType(),
738
'items_id' => $item->getID(),
739
]);
740
+ if ($dashboardRight->isNewItem()) {
741
+ $dashboardRight->add([
742
+ 'dashboards_dashboards_id' => $dashboard->fields['id'],
743
+ 'itemtype' => Profile::getType(),
744
+ 'items_id' => $item->getID(),
745
+ ]);
746
+ }
747
} else {
748
$dashboardRight->delete([
749
0 commit comments