Skip to content

Commit

Permalink
Merge branch '2023.11' into 2024.11
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Feb 5, 2024
2 parents 0a13e22 + 1d7233e commit 97ad0a7
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tine20/Calendar/Controller/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -2553,11 +2553,16 @@ protected function _checkGrant($_record, $_action, $_throw = TRUE, $_errorMessag
$hasGrant = Tinebase_Core::getUser()->hasGrant($_record->container_id, Tinebase_Model_Grants::GRANT_ADD);
break;
case 'update':
$hasGrant = (bool) $_oldRecord->hasGrant(Tinebase_Model_Grants::GRANT_EDIT);

if ($_oldRecord->container_id != $_record->container_id) {
$hasGrant &= Tinebase_Core::getUser()->hasGrant($_record->container_id, Tinebase_Model_Grants::GRANT_ADD)
&& $_oldRecord->hasGrant(Tinebase_Model_Grants::GRANT_DELETE);
if ($_oldRecord) {
$hasGrant = (bool) $_oldRecord->hasGrant(Tinebase_Model_Grants::GRANT_EDIT);

if ($_oldRecord->container_id != $_record->container_id) {
$hasGrant &= Tinebase_Core::getUser()->hasGrant($_record->container_id, Tinebase_Model_Grants::GRANT_ADD)
&& $_oldRecord->hasGrant(Tinebase_Model_Grants::GRANT_DELETE);
}
} else {
$hasGrant = Tinebase_Core::getUser()->hasGrant($_record->container_id, Tinebase_Model_Grants::GRANT_EDIT)
&& $_record->hasGrant(Tinebase_Model_Grants::GRANT_EDIT);
}
break;
case 'delete':
Expand Down

0 comments on commit 97ad0a7

Please sign in to comment.