aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/FileInfo.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-09-04 14:05:14 +0200
committerGitHub <noreply@github.com>2023-09-04 14:05:14 +0200
commit64f62f7cfd9c84090dcb78106ad692c5cb75ee20 (patch)
treece1864c2425c4dcae22b9438352e1cff6ba44310 /lib/private/Files/FileInfo.php
parent489a57e9a382ac72ee46d8740506f4e8f607d131 (diff)
parente73889a24099091810a66623ded57346692ae2d6 (diff)
downloadnextcloud-server-64f62f7cfd9c84090dcb78106ad692c5cb75ee20.tar.gz
nextcloud-server-64f62f7cfd9c84090dcb78106ad692c5cb75ee20.zip
Merge pull request #39863 from nextcloud/sharing-mask-wrapper
move share permission logic to storage wrapper
Diffstat (limited to 'lib/private/Files/FileInfo.php')
-rw-r--r--lib/private/Files/FileInfo.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php
index 3937ee16a7c..d0550913993 100644
--- a/lib/private/Files/FileInfo.php
+++ b/lib/private/Files/FileInfo.php
@@ -233,7 +233,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
}
/**
- * Return the currently version used for the HMAC in the encryption app
+ * Return the current version used for the HMAC in the encryption app
*/
public function getEncryptedVersion(): int {
return isset($this->data['encryptedVersion']) ? (int) $this->data['encryptedVersion'] : 1;
@@ -243,11 +243,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
* @return int
*/
public function getPermissions() {
- $perms = (int) $this->data['permissions'];
- if (\OCP\Util::isSharingDisabledForUser() || ($this->isShared() && !\OC\Share\Share::isResharingAllowed())) {
- $perms = $perms & ~\OCP\Constants::PERMISSION_SHARE;
- }
- return $perms;
+ return (int) $this->data['permissions'];
}
/**