} else {
$permissions = Constants::PERMISSION_READ;
}
+
// TODO: It might make sense to have a dedicated setting to allow/deny converting link shares into federated ones
- if ($this->shareManager->outgoingServer2ServerSharesAllowed()) {
+ if (($permissions & Constants::PERMISSION_READ) && $this->shareManager->outgoingServer2ServerSharesAllowed()) {
$permissions |= Constants::PERMISSION_SHARE;
}
+
$share->setPermissions($permissions);
// Set password
}
if ($newPermissions !== null) {
+ // TODO: It might make sense to have a dedicated setting to allow/deny converting link shares into federated ones
+ if (($newPermissions & Constants::PERMISSION_READ) && $this->shareManager->outgoingServer2ServerSharesAllowed()) {
+ $newPermissions |= Constants::PERMISSION_SHARE;
+ }
+
$share->setPermissions($newPermissions);
$permissions = $newPermissions;
}