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