Commit Graph

1533 Commits

Author SHA1 Message Date
Joas Schilling fb8b34bdd0 Allow defining a limit and offset for getObjectIdsForTags 2016-02-23 09:04:15 +01:00
Thomas Müller 83d5080e78 Merge pull request #22581 from owncloud/fix_interface
since 9.0 we have a additional parameter $position used for integrity…
2016-02-22 20:20:33 +01:00
Thomas Müller 4537eaac41 Add ILIKE support to querybuilder 2016-02-22 19:46:37 +01:00
Bjoern Schiessle 33ec70d57e since 9.0 we have a additional parameter $position used for integrity checks 2016-02-22 18:25:01 +01:00
Roeland Jago Douma fe08b5e9d9 We should check for exceptions when trying to get the avatar
Fixes #22550

* Updated phpdoc of avatatmanager
* Add unit test
2016-02-22 10:14:14 +01:00
Joas Schilling 8756a22c60 Fix more things 2016-02-19 09:43:11 +01:00
Scrutinizer Auto-Fixer 0d0151a3e1 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2016-02-19 09:43:11 +01:00
v1r0x 534071f4b2 set correct http status code
Was intended to respond with a 303 (See other) status code instead of 307 (Temporary Redirect).
2016-02-18 11:56:09 +01:00
Roeland Jago Douma 6bd0d51b2a More characters are allowed on POSIX systems 2016-02-12 07:49:31 +01:00
Thomas Müller 8b165c5ed5 No longer evaluate appinfo/version 2016-02-10 17:24:14 +01:00
Björn Schießle cf3a8f274f make it backward compatible to work with signed and un-signed files 2016-02-09 23:43:25 +01:00
Thomas Müller 29f6f451a9 Merge pull request #22192 from owncloud/fix_19685
Only set the default expiration date on share creation
2016-02-09 23:38:00 +01:00
C. Montero Luque 962d0c3290 Merge pull request #22252 from owncloud/consolidate-user-set-quota
Consolidate getQuota and setQuota methods in User instance
2016-02-09 22:00:24 +01:00
Arthur Schiwon 82a37d41d0 Doc improvements 2016-02-09 17:41:04 +01:00
Arthur Schiwon 3a796d1e15 Consolidate getQuota and setQuota methods in User instance 2016-02-09 17:16:43 +01:00
Thomas Müller 2982017682 Merge pull request #22228 from owncloud/comments-limit-message
Limit comment message to 1k chars
2016-02-09 16:35:23 +01:00
Arthur Schiwon bbc86e0756 on DAV throw Bad Request if provided message is too long 2016-02-09 13:59:13 +01:00
Roeland Jago Douma 426a12baaa Throw exception 2016-02-09 11:05:29 +01:00
Roeland Jago Douma ee65cd0bd8 Only set the default expiration date on share creation
Fixes #19685

The default expiration date should only be set when we create a new
share. So if a share is created and the expiration date is unset. And
after that the password is updated the expiration date should remain
unset.
2016-02-09 11:05:14 +01:00
Arthur Schiwon 347ad3e223 Limit comment message to 1k chars 2016-02-09 03:14:30 +01:00
Arthur Schiwon cd00751de5 Send events when enabling and disabling of apps 2016-02-09 02:51:12 +01:00
Thomas Müller ec399e6bbc Merge pull request #22200 from owncloud/node-checksum-resolvefileinfo
Make sure fileinfo exists when calling getCheckSum in node API
2016-02-08 16:10:31 +01:00
Thomas Müller acc7d63a69 Merge pull request #22164 from owncloud/files_external-verify
Add occ command to verify storage configurations
2016-02-08 15:21:07 +01:00
Roeland Jago Douma 1e8e00c541 Add proper throw tags to File 2016-02-08 14:44:26 +01:00
Robin Appelman b95e388526 Add occ command to verify storage configurations 2016-02-08 14:07:58 +01:00
Roeland Jago Douma a506f9ca3f Respect not allowing outgoing shares 2016-02-08 11:30:48 +01:00
Roeland Jago Douma 8486d61764 getSharesBy should also expire link shares 2016-02-06 13:31:54 +01:00
Thomas Müller 5832178f59 Merge pull request #22139 from owncloud/comments-files-cleanup
cleanup jobs for comments and comment read marks
2016-02-06 13:26:00 +01:00
Thomas Müller a9015d61a7 Merge pull request #22166 from owncloud/remove-local-folder
remove unused Storage->getLocalFolder
2016-02-06 13:21:59 +01:00
Joas Schilling 065141f6f4 Move casting to IExpressionBuilder 2016-02-05 21:26:30 +01:00
Thomas Müller 6ccd5ecb07 Merge pull request #22169 from owncloud/cache-interface-fixes
Cache interface cleanup/phpdoc
2016-02-05 18:09:19 +01:00
Robin Appelman 282c1cb24f remove unused Storage->search 2016-02-05 17:52:37 +01:00
Robin Appelman 559189cf47 additional phpdoc for search 2016-02-05 17:52:19 +01:00
Robin Appelman 615f0f5499 add deprecation notice to search methods 2016-02-05 17:46:43 +01:00
Robin Appelman fb76d7de69 remove unused Storage->getLocalFolder 2016-02-05 16:48:08 +01:00
Thomas Müller e15a120f83 Merge pull request #22152 from owncloud/activities-for-comments
Activities for comments
2016-02-05 13:50:38 +01:00
Joas Schilling 97b907335a Dispatch an event when a console command is run 2016-02-05 12:24:54 +01:00
Joas Schilling e86dcdacc8 Dispatch events when adding, updating and deleting comments 2016-02-05 11:30:53 +01:00
Roeland Jago Douma 0f22a8db1d Also add type (file/folder) to IShare object
We need this for the hooks :(
2016-02-04 14:28:09 +01:00
Roeland Jago Douma fc215d0980 Make the share object lazy
Share providers can now just pass in a fileId. And the node will only be
created once needed.
2016-02-04 12:51:23 +01:00
Thomas Müller b594aa18ee Merge pull request #22110 from owncloud/comment-types-always-plural
types shall always be plural
2016-02-04 10:55:49 +01:00
Arthur Schiwon 9370491822 types shall always be plural 2016-02-03 19:28:15 +01:00
Roeland Jago Douma 96662c4d0d [Share 2.0] Fix shareManager 2016-02-03 19:25:29 +01:00
Roeland Jago Douma eb904c7aa9 [Share 2.0] Fix defaultshare provider 2016-02-03 19:25:29 +01:00
Roeland Jago Douma 78be766cf5 [Share 2.0] Use strings for ids
* sharedWith
* sharedBy
* shareOwner

Now all set/get strings with the id. (userId, groupId,
federatedsharerId).

This to avoid a huge amount of if statements
2016-02-03 19:25:29 +01:00
Thomas Müller ab1c79827e Merge pull request #22071 from owncloud/cache-split-insert
split cache->insert from cache->put
2016-02-03 14:32:28 +01:00
Thomas Müller aaf7299d28 Merge pull request #22070 from owncloud/share2_exceptions
Add sharing exceptions to OCP
2016-02-03 13:36:14 +01:00
Robin Appelman f2bba59b79 split cache->insert from cache->put 2016-02-03 12:55:36 +01:00
Roeland Jago Douma 2035a179bc Add store/retrieve checksums
* Add extra db column to filecache
* Bump version
* Update filecache code to actually handle checksum
* Webdav code to store/retrieve checksums
2016-02-03 09:03:51 +01:00
Roeland Jago Douma 4d7130ad31 [Share 2.0] Add exceptions to OCP 2016-02-02 14:07:11 +01:00
Thomas Müller ce053b9808 Merge pull request #22013 from owncloud/share2_moveshare
[Share 2.0] Allow moving of shares
2016-02-02 13:34:50 +01:00
Thomas Müller 2d1d89ee29 Merge pull request #22049 from owncloud/issue-22041-activities-for-systemtags
Issue 22041 activities for systemtags
2016-02-02 13:08:01 +01:00
Roeland Jago Douma 2316cb1f8b [Share 2.0] Allow moving of shares
* Only recipient can move a share
* Unit tests
2016-02-02 11:34:52 +01:00
Roeland Jago Douma 403547f0ea [Share 2.0] Allow recipient to be passed in to getShareById
* This allows us to retrieve usergroup shares for a given id.
  If the user deleted a share or moved it this will be a different share
2016-02-02 10:41:57 +01:00
Joas Schilling d5126b1ad4 Dispatch events when tags are added/updated/deleted 2016-02-02 09:57:42 +01:00
Joas Schilling 591613fce2 Dispatch some events when tags are un-/assigned 2016-02-02 09:57:42 +01:00
Thomas Müller b4853f3fce Merge pull request #21967 from owncloud/comments-webdav
Comments WebDAV adjustements
2016-02-01 16:17:45 +01:00
Thomas Müller 32067ac49b Merge pull request #21989 from owncloud/make-csp-modifiable
Add public API to give developers the possibility to adjust the global CSP defaults
2016-02-01 10:10:40 +01:00
Thomas Müller a025b2865f Merge pull request #22022 from owncloud/share_ocs_filter_path_sharedwithme
Add path filter to OCS Share API shared_with_me=true
2016-02-01 09:00:31 +01:00
Thomas Müller 5f4b204a49 Merge pull request #22012 from owncloud/storagenotavailableexception-code
Default to STATUS_ERROR in StorageNotAvailableException
2016-02-01 09:00:14 +01:00
Thomas Müller 67bf225fbe Merge pull request #21956 from owncloud/cross-cache-move
Add fallback moveFromCache implementation
2016-01-29 17:03:16 +01:00
Roeland Jago Douma a24e7f6558 Add path filter to OCS Share API ?shared_with_me=true
This allows all clients to quickly get the share info for a given path.
Instead of returning everything and filtering it then manually on the
client side.
2016-01-29 15:36:23 +01:00
Arthur Schiwon 01cdc70f9c introduce comments read marke tables, comes with user cleanup after deletion 2016-01-29 13:08:02 +01:00
Arthur Schiwon d2882b9021 Comments WebDAV adjustements 2016-01-29 13:08:02 +01:00
Robin Appelman ec3f6549f6 Add fallback moveFromCache implementation 2016-01-29 13:06:59 +01:00
Robin McCorkell 2abb173599 Default to STATUS_ERROR in StorageNotAvailableException 2016-01-29 11:57:25 +00:00
Joas Schilling c83b3d6a26 Remove other broken usages in deprecated methods 2016-01-29 08:50:29 +01:00
Lukas Reschke 809ff5ac95 Add public API to give developers the possibility to adjust the global CSP defaults
Allows to inject something into the default content policy. This is for
example useful when you're injecting Javascript code into a view belonging
to another controller and cannot modify its Content-Security-Policy itself.
Note that the adjustment is only applied to applications that use AppFramework
controllers.

To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`,
$policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`.

To test this add something like the following into an `app.php` of any enabled app:
```
$manager = \OC::$server->getContentSecurityPolicyManager();
$policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false);
$policy->addAllowedFrameDomain('asdf');
$policy->addAllowedScriptDomain('yolo.com');

$policy->allowInlineScript(false);
$manager->addDefaultPolicy($policy);
$policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false);
$policy->addAllowedFontDomain('yolo.com');
$manager->addDefaultPolicy($policy);

$policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false);
$policy->addAllowedFrameDomain('banana.com');
$manager->addDefaultPolicy($policy);
```

If you now open the files app the policy should be:

```
Content-Security-Policy:default-src 'none';script-src yolo.com 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src yolo.com 'self';connect-src 'self';media-src 'self';frame-src asdf banana.com 'self'
```
2016-01-28 18:36:46 +01:00
Joas Schilling ef73aedd7e Deprecate the method and warn against using it 2016-01-28 15:40:23 +01:00
Thomas Müller b7710ab6d7 Merge pull request #21858 from owncloud/getMountsForFileId
add IUserMountCache->getMountsForFileId
2016-01-28 11:20:42 +01:00
Roeland Jago Douma 8d44e537ac [Share 2.0] Remove setId and setProviderId from the interface
Those should only ever be set by the providers
2016-01-28 07:54:16 +01:00
Roeland Jago Douma 34e912ab6b [Share 2.0] Fix interfaces and comments
* Made comments more clear
* Removed unneeded methods
* IShares shareTime is now a proper DateTime object
* IShares getPath -> getNode & setPath -> setNode
* Fix unit tests
2016-01-28 07:54:09 +01:00
Roeland Jago Douma f2e70441e4 [Share 2.0] Add getShareManager to OCP\IServerContainer 2016-01-27 22:04:37 +01:00
Roeland Jago Douma 357b271cb4 [Share 2.0] Create IManger interface for share manager 2016-01-27 22:04:37 +01:00
Roeland Jago Douma 185b9c6edd [Share 2.0] Move IShare to OCP 2016-01-27 22:04:37 +01:00
Robin Appelman 6682f31074 clean cache interface 2016-01-27 15:51:39 +01:00
Robin Appelman 644a8ab797 add IUserMountCache->getMountsForFileId 2016-01-27 12:53:44 +01:00
Thomas Müller 1594371c8c Merge pull request #21741 from owncloud/l10n-improvements
Move methods to the factory that are not related to translating, but to guessing/finding the language
2016-01-27 09:37:00 +01:00
Joas Schilling 7514695399 Fix Oracle comparisons 2016-01-26 14:56:07 +01:00
Joas Schilling 90ce876378 Adjust comments to the new constants 2016-01-26 14:56:07 +01:00
Joas Schilling 6652a0fb6c Move finding the language files and creating the function out of the object 2016-01-26 14:02:31 +01:00
Joas Schilling 043625ee52 Move findLanguage() and setLanguageFromRequest() to factory 2016-01-26 14:02:31 +01:00
Joas Schilling 29a9306429 Move languageExists() to the factory 2016-01-26 14:02:31 +01:00
Joas Schilling 6aec550d6e Move findAvailableLanguages() to the factory 2016-01-26 14:02:30 +01:00
Thomas Müller 2bafb1c649 Merge pull request #21894 from owncloud/refactor-csrf
Add new CSRF manager for unit testing purposes
2016-01-26 11:36:56 +01:00
Thomas Müller 4c9e328211 Merge pull request #21892 from owncloud/issue-21890-parameters
Add parameters types to IQueryBuilder
2016-01-25 21:13:41 +01:00
Lukas Reschke a977465af5 Add new CSRF manager for unit testing purposes
This adds a new CSRF manager for unit testing purposes, it's interface is based upon https://github.com/symfony/security-csrf. Due to some of our required custom changes it is however not possible to use the Symfony component directly.
2016-01-25 20:03:40 +01:00
Joas Schilling c5046fb2a9 Add parameters to public interface 2016-01-25 17:17:20 +01:00
Thomas Müller 728caf13f8 Adding support of -1 as size to be passed into get and getFile 2016-01-25 16:54:40 +01:00
Morris Jobke 75e6734ef4 Remove OC_Helper::imagePath and use the proper public interface 2016-01-24 18:04:20 +01:00
Thomas Müller 7731b29136 Merge pull request #21719 from owncloud/move-notification-api-to-ocp
Move the notification API to public namespace
2016-01-22 16:20:26 +01:00
Thomas Müller 9b4c9a0357 Merge pull request #18531 from owncloud/ext-user-credentials
External storage 'Login credentials' auth mechanism
2016-01-22 13:14:14 +01:00
Joas Schilling 31c5848e51 Allow automatic injection of the Manager 2016-01-22 11:02:40 +01:00
Thomas Müller 1410120758 Merge pull request #20768 from owncloud/mount-cache
cache mountpoints in the db
2016-01-22 11:01:54 +01:00
Joas Schilling 9ea7ae6f87 Adjust the since on the interface 2016-01-22 10:51:36 +01:00
Joas Schilling ee02165005 Move the notification API to public namespace 2016-01-22 10:32:42 +01:00
Morris Jobke 75ee5a9e9a Fix PHPDoc - @changed is no official tag -> use @since 2016-01-22 08:43:05 +01:00
Thomas Müller 7c7467fe42 Merge pull request #21792 from owncloud/systemtags-managerfactory
Allow custom implementation of system tag managers
2016-01-21 12:13:01 +01:00
Vincent Petry 899f9bd113 Allow custom implementation of system tag managers
Added config.php option to replace the default implementation of system
tag manager and system tag object mapper.

Also adjusted the comments manager factory to inject the server container
2016-01-20 16:36:10 +01:00
Robin Appelman 483c6b68e2 clear mount cache when removing applicables 2016-01-20 16:32:56 +01:00