File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,15 @@ public function getEncryptedVersion() {
207207 */
208208 public function getPermissions () {
209209 $ perms = $ this ->data ['permissions ' ];
210- if (\OCP \Util::isSharingDisabledForUser () || ($ this ->isShared () && !\OC \Share \Share::isResharingAllowed ())) {
210+ $ isResharingForbidden = $ this ->isShared () && !\OC \Share \Share::isResharingAllowed ();
211+ $ shareFolder = \trim (\OC ::$ server ->getConfig ()->getSystemValue ('share_folder ' , '/ ' ), '/ ' );
212+ $ trimmedPath = \trim ($ this ->getInternalPath (), '/ ' );
213+ $ isShareFolder = $ trimmedPath === "files/ $ shareFolder " ;
214+ if (
215+ \OCP \Util::isSharingDisabledForUser ()
216+ || $ isResharingForbidden
217+ || $ isShareFolder
218+ ) {
211219 $ perms = $ perms & ~\OCP \Constants::PERMISSION_SHARE ;
212220 }
213221 return $ perms ;
You can’t perform that action at this time.
0 commit comments