Exemplo n.º 1
0
 /**
  * Check if resharing is allowed
  *
  * @return boolean true if allowed or false
  */
 public static function isResharingAllowed()
 {
     return \OC\Share\Share::isResharingAllowed();
 }
Exemplo n.º 2
0
 public function isSharable($path)
 {
     if (\OCP\Util::isSharingDisabledForUser() || !\OC\Share\Share::isResharingAllowed()) {
         return false;
     }
     return $this->getPermissions($path) & \OCP\Constants::PERMISSION_SHARE;
 }
Exemplo n.º 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;
 }