@@ -30,25 +30,25 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | class User extends \Sabre\CalDAV\Principal\User { |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Returns a list of ACE's for this node. |
|
| 35 | - * |
|
| 36 | - * Each ACE has the following properties: |
|
| 37 | - * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are |
|
| 38 | - * currently the only supported privileges |
|
| 39 | - * * 'principal', a url to the principal who owns the node |
|
| 40 | - * * 'protected' (optional), indicating that this ACE is not allowed to |
|
| 41 | - * be updated. |
|
| 42 | - * |
|
| 43 | - * @return array |
|
| 44 | - */ |
|
| 45 | - public function getACL() { |
|
| 46 | - $acl = parent::getACL(); |
|
| 47 | - $acl[] = [ |
|
| 48 | - 'privilege' => '{DAV:}read', |
|
| 49 | - 'principal' => '{DAV:}authenticated', |
|
| 50 | - 'protected' => true, |
|
| 51 | - ]; |
|
| 52 | - return $acl; |
|
| 53 | - } |
|
| 33 | + /** |
|
| 34 | + * Returns a list of ACE's for this node. |
|
| 35 | + * |
|
| 36 | + * Each ACE has the following properties: |
|
| 37 | + * * 'privilege', a string such as {DAV:}read or {DAV:}write. These are |
|
| 38 | + * currently the only supported privileges |
|
| 39 | + * * 'principal', a url to the principal who owns the node |
|
| 40 | + * * 'protected' (optional), indicating that this ACE is not allowed to |
|
| 41 | + * be updated. |
|
| 42 | + * |
|
| 43 | + * @return array |
|
| 44 | + */ |
|
| 45 | + public function getACL() { |
|
| 46 | + $acl = parent::getACL(); |
|
| 47 | + $acl[] = [ |
|
| 48 | + 'privilege' => '{DAV:}read', |
|
| 49 | + 'principal' => '{DAV:}authenticated', |
|
| 50 | + 'protected' => true, |
|
| 51 | + ]; |
|
| 52 | + return $acl; |
|
| 53 | + } |
|
| 54 | 54 | } |
@@ -32,17 +32,17 @@ |
||
| 32 | 32 | |
| 33 | 33 | class OffsetFilter implements XmlDeserializable { |
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * @param Reader $reader |
|
| 37 | - * @throws BadRequest |
|
| 38 | - * @return int |
|
| 39 | - */ |
|
| 40 | - public static function xmlDeserialize(Reader $reader) { |
|
| 41 | - $value = $reader->parseInnerTree(); |
|
| 42 | - if (!is_int($value) && !is_string($value)) { |
|
| 43 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}offset has illegal value'); |
|
| 44 | - } |
|
| 35 | + /** |
|
| 36 | + * @param Reader $reader |
|
| 37 | + * @throws BadRequest |
|
| 38 | + * @return int |
|
| 39 | + */ |
|
| 40 | + public static function xmlDeserialize(Reader $reader) { |
|
| 41 | + $value = $reader->parseInnerTree(); |
|
| 42 | + if (!is_int($value) && !is_string($value)) { |
|
| 43 | + throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}offset has illegal value'); |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - return (int)$value; |
|
| 47 | - } |
|
| 46 | + return (int)$value; |
|
| 47 | + } |
|
| 48 | 48 | } |
@@ -32,17 +32,17 @@ |
||
| 32 | 32 | |
| 33 | 33 | class LimitFilter implements XmlDeserializable { |
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * @param Reader $reader |
|
| 37 | - * @throws BadRequest |
|
| 38 | - * @return int |
|
| 39 | - */ |
|
| 40 | - public static function xmlDeserialize(Reader $reader) { |
|
| 41 | - $value = $reader->parseInnerTree(); |
|
| 42 | - if (!is_int($value) && !is_string($value)) { |
|
| 43 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}limit has illegal value'); |
|
| 44 | - } |
|
| 35 | + /** |
|
| 36 | + * @param Reader $reader |
|
| 37 | + * @throws BadRequest |
|
| 38 | + * @return int |
|
| 39 | + */ |
|
| 40 | + public static function xmlDeserialize(Reader $reader) { |
|
| 41 | + $value = $reader->parseInnerTree(); |
|
| 42 | + if (!is_int($value) && !is_string($value)) { |
|
| 43 | + throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}limit has illegal value'); |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - return (int)$value; |
|
| 47 | - } |
|
| 46 | + return (int)$value; |
|
| 47 | + } |
|
| 48 | 48 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | use OCP\WorkflowEngine\IManager; |
| 29 | 29 | |
| 30 | 30 | class Admin extends ASettings { |
| 31 | - public function getScope(): int { |
|
| 32 | - return IManager::SCOPE_ADMIN; |
|
| 33 | - } |
|
| 31 | + public function getScope(): int { |
|
| 32 | + return IManager::SCOPE_ADMIN; |
|
| 33 | + } |
|
| 34 | 34 | } |
@@ -32,17 +32,17 @@ |
||
| 32 | 32 | * Amazon S3 access key authentication |
| 33 | 33 | */ |
| 34 | 34 | class AccessKey extends AuthMechanism { |
| 35 | - public const SCHEME_AMAZONS3_ACCESSKEY = 'amazons3_accesskey'; |
|
| 35 | + public const SCHEME_AMAZONS3_ACCESSKEY = 'amazons3_accesskey'; |
|
| 36 | 36 | |
| 37 | - public function __construct(IL10N $l) { |
|
| 38 | - $this |
|
| 39 | - ->setIdentifier('amazons3::accesskey') |
|
| 40 | - ->setScheme(self::SCHEME_AMAZONS3_ACCESSKEY) |
|
| 41 | - ->setText($l->t('Access key')) |
|
| 42 | - ->addParameters([ |
|
| 43 | - new DefinitionParameter('key', $l->t('Access key')), |
|
| 44 | - (new DefinitionParameter('secret', $l->t('Secret key'))) |
|
| 45 | - ->setType(DefinitionParameter::VALUE_PASSWORD), |
|
| 46 | - ]); |
|
| 47 | - } |
|
| 37 | + public function __construct(IL10N $l) { |
|
| 38 | + $this |
|
| 39 | + ->setIdentifier('amazons3::accesskey') |
|
| 40 | + ->setScheme(self::SCHEME_AMAZONS3_ACCESSKEY) |
|
| 41 | + ->setText($l->t('Access key')) |
|
| 42 | + ->addParameters([ |
|
| 43 | + new DefinitionParameter('key', $l->t('Access key')), |
|
| 44 | + (new DefinitionParameter('secret', $l->t('Secret key'))) |
|
| 45 | + ->setType(DefinitionParameter::VALUE_PASSWORD), |
|
| 46 | + ]); |
|
| 47 | + } |
|
| 48 | 48 | } |
@@ -30,11 +30,11 @@ |
||
| 30 | 30 | use Sabre\DAV\IFile; |
| 31 | 31 | |
| 32 | 32 | abstract class AbstractTrashFile extends AbstractTrash implements IFile, ITrash { |
| 33 | - public function put($data) { |
|
| 34 | - throw new Forbidden(); |
|
| 35 | - } |
|
| 33 | + public function put($data) { |
|
| 34 | + throw new Forbidden(); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - public function setName($name) { |
|
| 38 | - throw new Forbidden(); |
|
| 39 | - } |
|
| 37 | + public function setName($name) { |
|
| 38 | + throw new Forbidden(); |
|
| 39 | + } |
|
| 40 | 40 | } |
@@ -33,29 +33,29 @@ |
||
| 33 | 33 | use OCP\IL10N; |
| 34 | 34 | |
| 35 | 35 | class Swift extends Backend { |
| 36 | - use LegacyDependencyCheckPolyfill; |
|
| 36 | + use LegacyDependencyCheckPolyfill; |
|
| 37 | 37 | |
| 38 | - public function __construct(IL10N $l, OpenStackV2 $openstackAuth, Rackspace $rackspaceAuth) { |
|
| 39 | - $this |
|
| 40 | - ->setIdentifier('swift') |
|
| 41 | - ->addIdentifierAlias('\OC\Files\Storage\Swift') // legacy compat |
|
| 42 | - ->setStorageClass('\OCA\Files_External\Lib\Storage\Swift') |
|
| 43 | - ->setText($l->t('OpenStack Object Storage')) |
|
| 44 | - ->addParameters([ |
|
| 45 | - (new DefinitionParameter('service_name', $l->t('Service name'))) |
|
| 46 | - ->setFlag(DefinitionParameter::FLAG_OPTIONAL), |
|
| 47 | - new DefinitionParameter('region', $l->t('Region')), |
|
| 48 | - new DefinitionParameter('bucket', $l->t('Bucket')), |
|
| 49 | - (new DefinitionParameter('timeout', $l->t('Request timeout (seconds)'))) |
|
| 50 | - ->setFlag(DefinitionParameter::FLAG_OPTIONAL), |
|
| 51 | - ]) |
|
| 52 | - ->addAuthScheme(AuthMechanism::SCHEME_OPENSTACK) |
|
| 53 | - ->setLegacyAuthMechanismCallback(function (array $params) use ($openstackAuth, $rackspaceAuth) { |
|
| 54 | - if (isset($params['options']['key']) && $params['options']['key']) { |
|
| 55 | - return $rackspaceAuth; |
|
| 56 | - } |
|
| 57 | - return $openstackAuth; |
|
| 58 | - }) |
|
| 59 | - ; |
|
| 60 | - } |
|
| 38 | + public function __construct(IL10N $l, OpenStackV2 $openstackAuth, Rackspace $rackspaceAuth) { |
|
| 39 | + $this |
|
| 40 | + ->setIdentifier('swift') |
|
| 41 | + ->addIdentifierAlias('\OC\Files\Storage\Swift') // legacy compat |
|
| 42 | + ->setStorageClass('\OCA\Files_External\Lib\Storage\Swift') |
|
| 43 | + ->setText($l->t('OpenStack Object Storage')) |
|
| 44 | + ->addParameters([ |
|
| 45 | + (new DefinitionParameter('service_name', $l->t('Service name'))) |
|
| 46 | + ->setFlag(DefinitionParameter::FLAG_OPTIONAL), |
|
| 47 | + new DefinitionParameter('region', $l->t('Region')), |
|
| 48 | + new DefinitionParameter('bucket', $l->t('Bucket')), |
|
| 49 | + (new DefinitionParameter('timeout', $l->t('Request timeout (seconds)'))) |
|
| 50 | + ->setFlag(DefinitionParameter::FLAG_OPTIONAL), |
|
| 51 | + ]) |
|
| 52 | + ->addAuthScheme(AuthMechanism::SCHEME_OPENSTACK) |
|
| 53 | + ->setLegacyAuthMechanismCallback(function (array $params) use ($openstackAuth, $rackspaceAuth) { |
|
| 54 | + if (isset($params['options']['key']) && $params['options']['key']) { |
|
| 55 | + return $rackspaceAuth; |
|
| 56 | + } |
|
| 57 | + return $openstackAuth; |
|
| 58 | + }) |
|
| 59 | + ; |
|
| 60 | + } |
|
| 61 | 61 | } |
@@ -29,12 +29,12 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | class GroupMapping extends AbstractMapping { |
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * returns the DB table name which holds the mappings |
|
| 34 | - * @return string |
|
| 35 | - */ |
|
| 36 | - protected function getTableName(bool $includePrefix = true) { |
|
| 37 | - $p = $includePrefix ? '*PREFIX*' : ''; |
|
| 38 | - return $p . 'ldap_group_mapping'; |
|
| 39 | - } |
|
| 32 | + /** |
|
| 33 | + * returns the DB table name which holds the mappings |
|
| 34 | + * @return string |
|
| 35 | + */ |
|
| 36 | + protected function getTableName(bool $includePrefix = true) { |
|
| 37 | + $p = $includePrefix ? '*PREFIX*' : ''; |
|
| 38 | + return $p . 'ldap_group_mapping'; |
|
| 39 | + } |
|
| 40 | 40 | } |
@@ -29,22 +29,22 @@ |
||
| 29 | 29 | use OCP\IInitialStateService; |
| 30 | 30 | |
| 31 | 31 | class InitialState implements IInitialState { |
| 32 | - /** @var IInitialStateService */ |
|
| 33 | - private $state; |
|
| 32 | + /** @var IInitialStateService */ |
|
| 33 | + private $state; |
|
| 34 | 34 | |
| 35 | - /** @var string */ |
|
| 36 | - private $appName; |
|
| 35 | + /** @var string */ |
|
| 36 | + private $appName; |
|
| 37 | 37 | |
| 38 | - public function __construct(IInitialStateService $state, string $appName) { |
|
| 39 | - $this->state = $state; |
|
| 40 | - $this->appName = $appName; |
|
| 41 | - } |
|
| 38 | + public function __construct(IInitialStateService $state, string $appName) { |
|
| 39 | + $this->state = $state; |
|
| 40 | + $this->appName = $appName; |
|
| 41 | + } |
|
| 42 | 42 | |
| 43 | - public function provideInitialState(string $key, $data): void { |
|
| 44 | - $this->state->provideInitialState($this->appName, $key, $data); |
|
| 45 | - } |
|
| 43 | + public function provideInitialState(string $key, $data): void { |
|
| 44 | + $this->state->provideInitialState($this->appName, $key, $data); |
|
| 45 | + } |
|
| 46 | 46 | |
| 47 | - public function provideLazyInitialState(string $key, \Closure $closure): void { |
|
| 48 | - $this->state->provideLazyInitialState($this->appName, $key, $closure); |
|
| 49 | - } |
|
| 47 | + public function provideLazyInitialState(string $key, \Closure $closure): void { |
|
| 48 | + $this->state->provideLazyInitialState($this->appName, $key, $closure); |
|
| 49 | + } |
|
| 50 | 50 | } |