From 1bcaf545bb9099d14b9545311079d7a3ece274d9 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 1 Dec 2023 10:06:52 -0700 Subject: [PATCH] * Infolog: Take group add ACL into account for type on new entries Previously just edit ACL was considered --- infolog/inc/class.infolog_ui.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/infolog/inc/class.infolog_ui.inc.php b/infolog/inc/class.infolog_ui.inc.php index f7b140f20b..b11b92e592 100644 --- a/infolog/inc/class.infolog_ui.inc.php +++ b/infolog/inc/class.infolog_ui.inc.php @@ -2196,6 +2196,12 @@ class infolog_ui // remove types owned by groups the user has no edit grant (current type is made readonly) foreach($this->bo->group_owners as $type => $group) { + // Allow the group if the entry is unsaved and they have add access + if(!$content['info_id'] && (($this->bo->grants[$group] ?? 0) & Acl::ADD)) + { + continue; + } + if (!(($this->bo->grants[$group]??0) & Acl::EDIT)) { if ($type == $content['info_type'])