Exemple #1
0
 /**
  * Check if resharing is allowed
  *
  * @return boolean true if allowed or false
  */
 public static function isResharingAllowed()
 {
     return \OC\Share\Share::isResharingAllowed();
 }
Exemple #2
0
 public function isSharable($path)
 {
     if (\OCP\Util::isSharingDisabledForUser() || !\OC\Share\Share::isResharingAllowed()) {
         return false;
     }
     return $this->getPermissions($path) & \OCP\Constants::PERMISSION_SHARE;
 }
Exemple #3
0
 /**
  * @return int
  */
 public function getPermissions()
 {
     $perms = $this->data['permissions'];
     if (\OCP\Util::isSharingDisabledForUser() || $this->isShared() && !\OC\Share\Share::isResharingAllowed()) {
         $perms = $perms & ~\OCP\Constants::PERMISSION_SHARE;
     }
     return $perms;
 }