aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/DAV/GroupPrincipalBackend.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/DAV/GroupPrincipalBackend.php')
-rw-r--r--apps/dav/lib/DAV/GroupPrincipalBackend.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php
index ae66d85f4ca..1b96f2ee8ba 100644
--- a/apps/dav/lib/DAV/GroupPrincipalBackend.php
+++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php
@@ -196,9 +196,8 @@ class GroupPrincipalBackend implements BackendInterface {
if ($prefixPath !== self::PRINCIPAL_PREFIX) {
return [];
}
- // If sharing is disabled, return the empty array
- $shareAPIEnabled = $this->shareManager->shareApiEnabled();
- if (!$shareAPIEnabled) {
+ // If sharing or group sharing is disabled, return the empty array
+ if (!$this->groupSharingEnabled()) {
return [];
}
@@ -273,8 +272,7 @@ class GroupPrincipalBackend implements BackendInterface {
*/
public function findByUri($uri, $principalPrefix) {
// If sharing is disabled, return the empty array
- $shareAPIEnabled = $this->shareManager->shareApiEnabled();
- if (!$shareAPIEnabled) {
+ if (!$this->groupSharingEnabled()) {
return null;
}
@@ -340,4 +338,11 @@ class GroupPrincipalBackend implements BackendInterface {
return $principal;
}
+
+ /**
+ * @return bool
+ */
+ private function groupSharingEnabled(): bool {
+ return $this->shareManager->shareApiEnabled() && $this->shareManager->allowGroupSharing();
+ }
}