aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-03-04 12:01:20 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-03-19 09:08:00 +0000
commit7f50e5f2d8305c9f95beb0242297c3c38dab1a56 (patch)
treec2551d5e26fab61873bf6f705402b2be1b2691bf /apps/dav
parent52aa2807356371eb3248b3e246d0af32ecc33e3f (diff)
downloadnextcloud-server-7f50e5f2d8305c9f95beb0242297c3c38dab1a56.tar.gz
nextcloud-server-7f50e5f2d8305c9f95beb0242297c3c38dab1a56.zip
chore: Break closure call on two lines to make it readable
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/SystemTag/SystemTagMappingNode.php3
-rw-r--r--apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/dav/lib/SystemTag/SystemTagMappingNode.php b/apps/dav/lib/SystemTag/SystemTagMappingNode.php
index a21987ab2aa..113c8d82836 100644
--- a/apps/dav/lib/SystemTag/SystemTagMappingNode.php
+++ b/apps/dav/lib/SystemTag/SystemTagMappingNode.php
@@ -119,7 +119,8 @@ class SystemTagMappingNode implements \Sabre\DAV\INode {
if (!$this->tagManager->canUserAssignTag($this->tag, $this->user)) {
throw new Forbidden('No permission to unassign tag ' . $this->tag->getId());
}
- if (!($this->childWriteAccessFunction)($this->objectId)) {
+ $writeAccessFunction = $this->childWriteAccessFunction;
+ if (!$writeAccessFunction($this->objectId)) {
throw new Forbidden('No permission to unassign tag to ' . $this->objectId);
}
$this->tagMapper->unassignTags($this->objectId, $this->objectType, $this->tag->getId());
diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php
index 39484b23e0f..b45ef6c3f71 100644
--- a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php
+++ b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php
@@ -64,7 +64,8 @@ class SystemTagsObjectMappingCollection implements ICollection {
if (!$this->tagManager->canUserAssignTag($tag, $this->user)) {
throw new Forbidden('No permission to assign tag ' . $tagId);
}
- if (!($this->childWriteAccessFunction)($this->objectId)) {
+ $writeAccessFunction = $this->childWriteAccessFunction;
+ if (!$writeAccessFunction($this->objectId)) {
throw new Forbidden('No permission to assign tag to ' . $this->objectId);
}
$this->tagMapper->assignTags($this->objectId, $this->objectType, $tagId);