Commit Graph

555 Commits

Author SHA1 Message Date
Roeland Jago Douma
6957917b20 [Share 2.0] Allow using permissions to update link share 2016-01-27 20:36:36 +01:00
Roeland Jago Douma
f5c45dfe7b [Share 2.0] Still allow isolated updates
Still allow isolated updates of parameters
2016-01-27 20:36:31 +01:00
Roeland Jago Douma
b321ceef60 [Share 2.0] Also handle empty parameter in updateShare
* More sanity checks
* More unit tests
2016-01-27 20:34:06 +01:00
Roeland Jago Douma
35a3432793 [Share 2.0] When passing empty strings don't fail
The password and expiration date can be set to empty strings when
created. This is now handled gracefully.
2016-01-27 20:34:06 +01:00
Joas Schilling
d46cd6a245 Fix tests 2016-01-26 14:02:32 +01:00
Roeland Jago Douma
18421e7e68 Directly get from the server container
* Updated unit tests
2016-01-20 21:12:26 +01:00
Roeland Jago Douma
8734ebe505 [Share 2.0] Make link share download use share manager 2016-01-20 21:12:26 +01:00
Roeland Jago Douma
717697313b [Share 2.0] Move tests over the sharemanager
Nice side effect... pure unit tests!
2016-01-20 21:12:26 +01:00
Roeland Jago Douma
d33e578665 [Share 2.0] Add share owner information to OCS Share API 2016-01-15 20:21:47 +01:00
Robin Appelman
5d0451b848 Safe teardowns 2016-01-14 12:54:42 +01:00
Roeland Jago Douma
cbd3050f4c [Share 2.0] Use full share id (providerId:shareId)
Now that we support multiple managers we communicate shares to the
outside as 'providerId:shareId'. This makes sures that id's are unique
when references from the OCS API.

However, since we do not want to break the OCS API v1 we need to
somewhat hack around this.

When we switch to OCS API v2 (which we should when we support more
custom providers). We will change the id to always be the fullShareId.
2016-01-13 16:35:15 +01:00
Thomas Müller
682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Roeland Jago Douma
be8125b8e2 Add unit tests to make sure we do not lower the search 2016-01-12 10:34:38 +01:00
Roeland Jago Douma
98c4951f45 getLowStrengthGenerator does not do anything anymore 2016-01-11 19:59:15 +01:00
Roeland Jago Douma
17a066c18e Properly close db cursors 2016-01-08 20:27:01 +01:00
Roeland Jago Douma
629bac22fd Make sure to respect deleted group shares by user 2016-01-08 20:27:01 +01:00
Roeland Jago Douma
066e3770bb Make sure that permissions stay in sync for share_type 2
When a file/folder is shared with a group and one of the group members
moves this file/folder an extra entry is created in the share table.

When the permission of the group share is updated we used to only
sometimes update the shares for individual users.

* Added intergration tests
2016-01-08 20:27:01 +01:00
Vincent Petry
9b595474af Fix public page URL JS test
Stub the port so it doesn't use the one configured by karma
2016-01-08 13:25:38 +01:00
Thomas Müller
601457d221 Merge pull request #20773 from owncloud/share2.0_create
[Sharing 2.0] create share
2016-01-07 14:57:05 +01:00
Vincent Petry
9742e9b113 Add token in webdav download link of public page 2016-01-07 13:37:18 +01:00
Roeland Jago Douma
527b434cd2 [Sharing 2.0] Do not use static function to get numeric storage id 2016-01-06 14:53:43 +01:00
Roeland Jago Douma
38d3a638ed [Share 2.0] Enable share creation via OCS API 2016-01-06 14:53:43 +01:00
Roeland Jago Douma
1f715289bf Removed deprecated function OC_User::deleteUser
Replaced with proper OCP calls
2015-12-17 16:18:40 +01:00
Roeland Jago Douma
835911bce5 Removed deprecated private OC_User::createUser
All function calls are replaced with the recommended (which was already
the body of the function).
2015-12-17 16:18:40 +01:00
Thomas Müller
1285b78086 Merge pull request #21200 from owncloud/files-authorizationheader
Use Authorization headers for public webdav in web UI
2015-12-17 15:30:13 +01:00
Thomas Müller
1ecda59c24 Merge pull request #21189 from owncloud/fix_21187
File shares can't have create permissions
2015-12-15 13:18:22 +01:00
Vincent Petry
1d37e7abfc Fixed JS unit tests for fed owner display name 2015-12-14 18:00:35 +01:00
Vincent Petry
ab9849e72f Use Authorization headers for public webdav instead of URL
Instead of prepending the token as username in the URL, use the
Authorization header instead. This is because IE9 considers this a
cross-domain call and refuses to do it in the first place.
2015-12-14 17:42:13 +01:00
Björn Schießle
c4b65170f2 show display name but internally use the user name 2015-12-14 17:25:10 +01:00
Roeland Jago Douma
843cf906b1 File shares can't have create permissions
fixes #21187
2015-12-14 14:03:14 +01:00
Robin Appelman
3d5a7b307f Add test case for group share propagation 2015-12-10 13:53:50 +01:00
Joas Schilling
5453daab03 More fixes to the docs 2015-12-08 09:11:50 +01:00
Scrutinizer Auto-Fixer
0f1be1b601 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-12-07 20:08:20 +00:00
Scrutinizer Auto-Fixer
453e1bf66e Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-12-07 15:43:36 +00:00
Joas Schilling
372f54075f Only return the exact match, when it's allowed 2015-12-02 16:01:01 +01:00
Thomas Müller
fd79511d68 Merge pull request #20688 from owncloud/publiclink-getdownloadurl-webdav
Fix public link getDownloadUrl to return Webdav public link
2015-11-30 15:07:36 +01:00
Thomas Müller
757aa45db7 Adding more DB groups to test suits
Adding more DB groups to test suits
2015-11-30 10:55:06 +01:00
Thomas Müller
3bb6dcea64 Apply DB group annotation ... 2015-11-30 10:55:05 +01:00
Vincent Petry
42091cecf9 Fix public link getDownloadUrl to return Webdav public link
This is for apps that use getDownloadUrl() to access the Webdav endpoint
for example for streaming.
Also happens when clicking on the download action of a file.

Note that the regular visible download URL is still the same.
2015-11-25 17:39:49 +01:00
Thomas Müller
9ec2f8886e Merge pull request #20691 from owncloud/share2.0_di_fixes
[Sharing 2.0] di fixes
2015-11-25 15:25:50 +01:00
Thomas Müller
50f6817ce9 Merge pull request #20439 from owncloud/etag-propagate-in-storage
Take submount etag into account for folder etags
2015-11-25 12:49:54 +01:00
Roeland Jago Douma
8d309767d7 [Sharing 2.0] Use the rootfolder to get the path of a share
We need to use the rootfolder here since we also other people than the
shareOwner can request a share.
2015-11-24 10:26:36 +01:00
Roeland Jago Douma
ab02b5c36e [Sharing 2.0] Move authentication to the OCS API 2015-11-24 10:26:36 +01:00
Roeland Jago Douma
aeae73b364 [Sharing 2.0] Removed unused DI stuff
The share manager etc should not care about filtering stuff. They should
return what is asked for them.
2015-11-24 10:26:36 +01:00
Thomas Müller
ab1d786d87 Fix port issue - options.host already has the port attached 2015-11-22 16:05:51 +01:00
Vincent Petry
f20232d4bd Make public link share page work with Webdav and add operations
The public page now uses the public.php/webdav endpoint.

Also enabled more file operations like rename, move, delete and create
folder from the public page, which are now all possible thanks to the
public.php/webdav endpoint.
2015-11-22 16:05:50 +01:00
Vincent Petry
fa2be0750c Make files app use Webdav for most operations 2015-11-22 16:05:50 +01:00
Robin Appelman
a95d4c2b22 update tests 2015-11-19 13:32:04 +01:00
Robin Appelman
888df3933d take the etag of child mounts into account for the folder etag
this replaces shared etag propagation
2015-11-19 13:32:00 +01:00
Roeland Jago Douma
1e9fc33212 [Share2.0] OCS Share API getShare uses new code 2015-11-16 13:32:28 +01:00
Robin Appelman
20cad09f7f Add tests for FileInfo owner 2015-11-10 11:06:48 +01:00
Roeland Jago Douma
6624fa212a The new sharing code now handles deletion
OCS -> ShareManager -> DefaultShareProvider
2015-11-05 15:59:09 +01:00
Vincent Petry
dcfaf3afdc Bring back delete permission in share overview 2015-10-29 17:56:54 +01:00
Lukas Reschke
8f09d5b67c Update license headers 2015-10-26 14:04:01 +01:00
Lukas Reschke
13e817e901 Throw exception on getPath if file does not exist
Currently the `getPath` methods returned `NULL` in case when a file with the specified ID does not exist. This however mandates that developers are checking for the `NULL` case and if they do not the door for bugs with all kind of impact is widely opened.

This is especially harmful if used in context with Views where the final result is limited based on the result of `getPath`, if `getPath` returns `NULL` PHP type juggles this to an empty string resulting in all possible kind of bugs.

While one could argue that this is a misusage of the API the fact is that it is very often misused and an exception will trigger an immediate stop of execution as well as log this behaviour and show a pretty error page.

I also adjusted some usages where I believe that we need to catch these errors, in most cases this is though simply an error that should hard-fail.
2015-10-25 17:58:21 +01:00
Roeland Jago Douma
ec296b0b7d Add backgroundjob to expire link shares
Simple background job to expire the link shares.

* added unit tests
2015-10-20 08:18:53 +02:00
Robin Appelman
8efd037eb8 Make shared folder size propagation test work with object home storage 2015-10-16 21:41:51 +02:00
Robin Appelman
e7f75484f8 Fix shared storage tests for non local home storage 2015-10-16 21:41:51 +02:00
Robin Appelman
0cdd46de60 fix sabre connector tests when using a non local home storage 2015-10-16 21:41:51 +02:00
Thomas Müller
17ffa4a244 Merge pull request #19414 from owncloud/swift_primary_storage_tests
Swift primary storage tests
2015-10-08 14:08:56 +02:00
Thomas Müller
b2872ef759 Merge pull request #19589 from owncloud/shares-external-mount-provider
Move the setup of external share mounts to a mountprovider
2015-10-07 17:46:33 +02:00
Robin Appelman
59cf817308 Merge pull request #19511 from owncloud/etag-share-permissions-update
Mark shares as dirty when changing permissions
2015-10-06 18:09:12 +02:00
Jörn Friedrich Dreyer
5646e39248 test objectstore with ceph docker
use default config for swift primary storage test config

allow testsuite to complete

fix timeout, script cleanup, enable debug for now

use btrfs loopback device, requires privileged container and absolute path

throw exception when storage has problems

debug by echo ...

sleep more, more debug
2015-10-06 16:27:25 +02:00
Vincent Petry
d546c5bb59 Propagate shares etag when group membership changed 2015-10-06 15:02:22 +02:00
Robin Appelman
41f9946272 clear hooks for tests 2015-10-06 11:38:41 +02:00
Robin Appelman
0817024e6f Mark shares as dirty when changing permissions 2015-10-06 11:38:41 +02:00
Morris Jobke
b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Robin Appelman
52c8b488cb fix test 2015-10-05 16:43:10 +02:00
Robin Appelman
76a528e511 Make the external share manager a mount provider 2015-10-05 16:18:14 +02:00
Thomas Müller
710b7dd81c Merge pull request #19487 from owncloud/split_share_middleware
Split files_sharing middelware
2015-10-05 10:57:11 +02:00
Roeland Jago Douma
4adc78b78b Fix and extend unit tests 2015-10-02 12:45:52 +02:00
Roeland Jago Douma
3d2acb5003 sharingcheckmiddleware now handles externalshares as well
Added new annotations for the externalsharescontroller class
* @NoOutgoingFederatedSharingRequired
* @NoIncomingFederatedSharingRequired

By default both are required for all functions in the
externalSharesController.

A proper exception is thrown and then a 405 is returned instead of the
default error page. Since it is only an API endpoint this makes more
sense.

Unit tests added and updated
2015-10-02 12:03:53 +02:00
Roeland Jago Douma
dc38e674a5 Split files_sharing middelware
Since for external shares there is no need for link shares to be enabled
we should check which controller is actually being called.

This makes sure that in all cases we verify that the files_sharing app
is enabled. But only for the share controller (public shares) we check
if the API is enabled and if links are enabled.

TODO: add checks for federated sharing as well
2015-10-02 11:56:11 +02:00
Joas Schilling
17ab8e6c39 Use shorter text on the sidebar for files_sharing activities 2015-10-02 10:01:33 +02:00
Lukas Reschke
22e724e829 Only intercept exceptions of type "NotFoundException" instead of any Exception
The sharing backend may throw another exception for example when the activity app encounters a problem. Previously this just triggered a 404 error page and the exception got not logged at all. With this change such exceptions get not intercepted and regularly handled as exceptions so that we have meaningful log data. Also the user will be shown a window informing him that an error happened.

Helps to debug cases such as https://github.com/owncloud/core/issues/19465
2015-09-30 13:32:20 +02:00
Vincent Petry
d47d240a35 Still show share link when recipient but no share permission
This makes it possible for the recipient to still trigger the sidebar
and share tab to see information about the share.

In the case where the file is not shared and no permissions exists, no
action icon will be displayed.
2015-09-28 16:23:33 +02:00
Roeland Jago Douma
db02173627 Reflect enabled shareAPI in capabilities
If the shareAPI is disabled we not return the other sharing
capabilities.

This allows clients to properly check if sharing is even available.
2015-09-25 20:12:41 +02:00
Joas Schilling
19e7a08cbf Do not allow user enumeration if the config is disabled 2015-09-23 15:11:02 +02:00
Roeland Jago Douma
4dba046712 Respect disabled sharing API settings
If the sharing API setting is disabled that sharing check middle ware
should block the request. Thus making link shares unavailable.
Fixes #18970

* Unit test added
* Unit tests updated
2015-09-22 15:12:16 +02:00
Lukas Reschke
36ce254ffd Move dummy backend to Tests namespace 2015-09-22 11:01:11 +02:00
Thomas Müller
93eb73b0bb Merge pull request #18986 from owncloud/federated_capabilities
Expose federated sharing capabilities to authenticated users
2015-09-18 11:58:54 +02:00
Thomas Müller
4cff2f1ab3 Merge pull request #19046 from owncloud/issue-18924-throw-error-on-invalid-page
Throw an error when the page count or perPage setting is invalid
2015-09-17 13:02:14 +02:00
Vincent Petry
886f1ed660 Update JS unit tests for share dialog (WIP) 2015-09-16 07:23:29 +02:00
Joas Schilling
754850f473 Fix status code 2015-09-15 15:51:54 +02:00
Roeland Jago Douma
91dfcab055 Expose federated sharing capabilities to authenticated users 2015-09-15 15:10:13 +02:00
Joas Schilling
aa8b1b2894 Throw an error when the page count or perPage setting is invalid 2015-09-15 15:04:04 +02:00
Joas Schilling
665716095b Fix parameter name to match the specs 2015-09-15 12:14:14 +02:00
Joas Schilling
805f1d0096 Scrap the notifications when the share is accepted or declined 2015-09-08 09:01:01 +02:00
Björn Schießle
39bd4ea8f2 Merge pull request #18234 from owncloud/ocs_api_for_sharees_list
Add OCS API for sharees list
2015-09-01 17:09:57 +02:00
Roeland Jago Douma
d54b497ade Return permissions and expiration on create share responses
Updated and added unit tests
2015-08-30 15:42:19 +02:00
Roeland Jago Douma
2aff11c80b Actually validate the expire date on share
* Added more intergration tests
2015-08-30 10:31:43 +02:00
Roeland Jago Douma
fc64ea670d Allow to directly set the expireDate on a new (link)share
Since this extends the API we now properly parse the date. We only
accept valid ISO 8601 Dates (YYYY-MM-DD).

Currently this only works for link shares (it is just ignored for other
shares). Since we do not have user/group/federated expiring shares yet.

* Tests added
2015-08-29 12:39:47 +02:00
Joas Schilling
199d1dc239 Bring the coverage back to 100% 2015-08-26 11:54:25 +02:00
Joas Schilling
2a6e676048 Adjust tests 2015-08-26 11:54:25 +02:00
Joas Schilling
ac8941f6ac Manually query for the last id 2015-08-26 11:54:25 +02:00
Joas Schilling
f4186d3dfc Fix wrong value for datetime field 2015-08-26 11:54:25 +02:00
Joas Schilling
937586a3f0 Rename file to match the class name 2015-08-26 11:54:25 +02:00
Joas Schilling
6b69e7b1da Add tests for "getShareesForShareIds()" 2015-08-26 11:54:25 +02:00
Joas Schilling
83b88c9a26 Do not return the current user himself 2015-08-26 11:54:25 +02:00
Joas Schilling
0227cfff08 Take a list of share IDs instead of the user and group names 2015-08-26 11:54:25 +02:00
Joas Schilling
5c4fbf5191 Inject the logger as well 2015-08-26 11:54:25 +02:00
Joas Schilling
a0ab7a2578 Add all possible links next, prev, first and last 2015-08-26 11:54:25 +02:00
Joas Schilling
c6ed40c9f8 Make shareType an array 2015-08-26 11:54:24 +02:00
Joas Schilling
068a81897e Add tests for "search()" 2015-08-26 11:54:24 +02:00
Joas Schilling
327c47a989 Do not use deprecated method in new code 2015-08-26 11:54:24 +02:00
Joas Schilling
3f64e9423b Split logic and global usage and add tests for "searchSharees()" 2015-08-26 11:54:24 +02:00
Joas Schilling
16e5c15c28 Add tests for "getRemote()" 2015-08-26 11:54:24 +02:00
Joas Schilling
ad450d4f0e Add tests for "getGroups()" 2015-08-26 11:54:24 +02:00
Joas Schilling
be257bc9cc Add tests for "getUsers()" 2015-08-26 11:54:24 +02:00
Joas Schilling
9b0058d2b0 Move test file to subdir 2015-08-26 11:54:24 +02:00
Roeland Jago Douma
b2fbecc39f Empty skeleton for tests 2015-08-26 11:54:24 +02:00
Morris Jobke
202af1e322 fix unit tests 2015-08-26 11:39:22 +02:00
Lukas Reschke
0a1d551090 Use IClientService to check for remote ownCloud instances
1. Allows to set a timeout (though still not perfect but way better than before)
2. Allows to have unit tests
3. I also added unit tests for the existing controller code
4. Corrected PHPDoc on IClient
2015-08-22 14:39:43 +02:00
Roeland Jago Douma
dce5d9b5d1 Add public upload to capability 2015-08-14 20:03:32 +02:00
Thomas Müller
ddc7f668e5 Merge pull request #18271 from owncloud/issue-18261-sharing-capabilities-use-wrong-default
Fix default values of sharing capabilities
2015-08-14 12:23:06 +02:00
Joas Schilling
20d8576d3d Fix config map provider for tests 2015-08-13 13:07:49 +02:00
Joas Schilling
acc452ae74 Add a basic unit test which notifies us about incompatible extending 2015-08-13 11:38:10 +02:00
Vincent Petry
55dc74bba4 Merge pull request #16543 from rullzer/files_sharing_proper_function_args
files_sharing private function to proper signature
2015-08-13 10:13:21 +02:00
Roeland Jago Douma
77b6e3d5ec Extend tests for files_sharing api 2015-08-11 15:16:35 +02:00
Jan-Christoph Borchardt
d04a6bce6f Merge pull request #17709 from owncloud/fileactions-dropdown
Move file actions to dropdown
2015-08-11 15:13:59 +02:00
Roeland Douma
c2856c05aa Merge pull request #15093 from rullzer/capabilities_manager
Capabilities manager
2015-08-10 20:33:50 +02:00
Vincent Petry
86e1eaf370 Inline actions using default renderer are now always permanent
Default renderer like the favorite icon can decide whether to use the
permanent class or not.

Fixed sharing code to properly update the icon according to sharing
state modifications.
2015-08-10 15:57:21 +02:00
Roeland Jago Douma
e84cffc063 Moved core apps to the capabilities manager
* Files
* Files_Sharing
* Files_Trashbin
* Files_Versions
2015-08-10 10:45:16 +02:00
Vincent Petry
3e44ca6dc2 Added unit tests for right sidebar 2015-08-07 01:22:43 +02:00
Robin Appelman
085acaf6ba add unit tests for share target conflict with group shares 2015-08-05 15:41:03 +02:00
Robin Appelman
7b70343dc3 fix infinite loops with propagating etags on reshares 2015-08-03 17:33:12 +02:00
Roeland Jago Douma
eb7a796ad9 Fix unit tests 2015-07-09 18:42:46 +02:00
Morris Jobke
0fe81d2f21 Merge pull request #17330 from owncloud/fix-share-path-for-group-exceptions
Fix the path for users which have an exception for a group share
2015-07-08 10:33:42 +02:00
Joas Schilling
594f5b6a29 Add visibility to test methods 2015-07-07 11:07:11 +02:00
Vincent Petry
fb0fef78f4 Add test case when owner renames shared folder 2015-07-07 11:06:21 +02:00
Vincent Petry
547c4b9a9f Add unit test for getUsersSharingFile
This is to test if the user list and paths are correct, even when a
recipient renamed the received shared folder
2015-07-07 11:06:11 +02:00
Vincent Petry
71ae96bb56 Do not show static share owner if not available
In some corner cases, an outgoing share exists but sharing is not
allowed for the current user. This would cause the file list to break
because the static text could not be rendered as the owner was
undefined.
2015-07-02 16:38:20 +02:00
Morris Jobke
f5c57e076e Merge pull request #17077 from owncloud/files-scan-absolute-path
fix getting mount points when passing a path to the files:scan command
2015-07-02 13:02:20 +02:00
Robin Appelman
3c0be7d126 only lock the parent folders 2015-07-01 15:10:25 +02:00
Robin Appelman
d6f56ea609 lock parent folders for the owner when locking a shared file as recipient 2015-07-01 15:10:22 +02:00
Morris Jobke
8f05d4b662 Merge pull request #16535 from rullzer/ocs_share_api_url
OCS Share API link shares now always have an url
2015-07-01 08:54:48 +02:00
Morris Jobke
f25b71f70e Merge pull request #15475 from rullzer/files_sharing_OCP_DB
Move files sharing app (mostly) to OCP\DB
2015-07-01 08:53:03 +02:00
Robin Appelman
abb0c728ef handle error during setup 2015-06-29 14:06:32 +02:00
Vincent Petry
b55f71ee03 Merge pull request #17083 from owncloud/share-etag-update-target
take share target into account when updating recipient etags
2015-06-29 09:10:37 +02:00
Lukas Reschke
d1f0ff372e Merge pull request #17163 from owncloud/update-licenses
Update license headers
2015-06-27 20:22:23 +02:00
Vincent Petry
56d9df34cb Unit test for etag update on custom share folder 2015-06-26 16:32:28 +02:00
Thomas Müller
9558562883 Merge pull request #17082 from owncloud/shared-etag-propagate-file
Fix etag propagation for single file shares
2015-06-26 12:36:17 +02:00
Morris Jobke
f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Robin Appelman
f847d9409e add unit test for single file share etag propagation 2015-06-24 18:16:03 +02:00
Roeland Jago Douma
6c3da1ec90 Added unit test to verify link password removeal 2015-06-24 12:38:33 +02:00
Morris Jobke
7550bf0917 Disable video preview if previews are disabled 2015-06-09 17:49:59 +02:00
Joas Schilling
d3e3a84cae Move the helpful method to the TestCase class 2015-06-03 12:33:29 +02:00
Roeland Jago Douma
41a8f45b93 OCS Share API link shares now always have an url
To make sure clients have the correct and latest link add an url field
to all OCS Share API return statements on public link shares.

* Added unit tests
2015-05-22 14:42:57 +02:00
Vincent Petry
7386257676 Merge pull request #16075 from owncloud/skeleton-copy-delay
wait with copying the skeleton untill login and setupfs are done
2015-05-20 13:52:08 +02:00
Lukas Reschke
9be6d8cd39 Merge pull request #16446 from owncloud/fix-url-generation
Fix URL generation
2015-05-20 08:20:38 +02:00
Vincent Petry
f7a2b5e7a9 Added unit tests for download URL in public sharing page 2015-05-19 17:41:06 +02:00
Scrutinizer Auto-Fixer
fdbc21fc6c Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-05-19 11:23:06 +00:00
Robin Appelman
415f16eb24 fix tests 2015-05-18 12:11:31 +02:00
Roeland Jago Douma
dd3d0194a6 Move files sharing app (mostly) to OCP\DB 2015-05-18 11:06:23 +02:00
Morris Jobke
90d8e4bc00 Merge pull request #15815 from owncloud/unshare-etag-propagate
Update etag of direct parent on unshare
2015-05-11 13:42:20 +02:00
Joas Schilling
b55ef51a27 Add tests for the correct share id on the call aswell 2015-04-28 14:56:13 +02:00
Vincent Petry
65fbb5eda0 Update etag of direct parent on unshare
Only call dirname() once instead of twice when propagating etags to the
recipient's parent folders.
2015-04-28 13:11:23 +02:00
Joas Schilling
66dca76f72 check the called URL 2015-04-28 11:28:54 +02:00
Robin Appelman
0789a6433e safer teardown 2015-04-27 14:07:16 +02:00
Robin Appelman
83b8ac0d7b cleanup hooks 2015-04-27 14:07:16 +02:00
Robin Appelman
dd9601ae8f fix merge 2015-04-27 14:07:16 +02:00
Robin Appelman
d5434c9c4e more propagation tests 2015-04-27 14:07:16 +02:00
Robin Appelman
b5c62cdad6 remove duplicates from rebase 2015-04-27 14:07:15 +02:00
Robin Appelman
19486837b2 adjust test 2015-04-27 14:07:15 +02:00
Robin Appelman
30ad56813a propagate etags for all user of a share 2015-04-27 14:07:15 +02:00
Robin Appelman
518d5aadf5 Allow getting *all* share entries owned by a user 2015-04-27 14:07:15 +02:00
Robin Appelman
2dc11cf20e unit test for etag propagation across shared storage boundary 2015-04-27 14:07:15 +02:00
Robin Appelman
03b7f1d015 use the permissions mask cache wrapper instead of the read only cache 2015-04-22 15:28:06 +02:00
Olivier Paroz
9695e33e34 Renamed class + split methods 2015-04-21 14:40:11 +02:00
Olivier Paroz
80a1f1858e Tests for read-only cache 2015-04-18 19:43:20 +02:00
Robin Appelman
d16ee4138d Fix test 2015-04-13 15:13:03 +02:00
Robin Appelman
d726db7459 Implement move/copyFromStorage for shared storage 2015-04-13 15:13:03 +02:00
Vincent Petry
2822d0579e Properly add trailing slash to mount point
Fixes resolving mount points when shared mount point's target name has
the same prefix as the source name
2015-04-13 12:36:47 +02:00
Vincent Petry
4a225aa12c Clear leftover shares from other tests 2015-04-10 14:53:17 +02:00
Vincent Petry
5803a1f5f7 Remove trashbin storage wrapper when disabling it for tests 2015-04-09 15:02:24 +02:00
Vincent Petry
4acf6747d2 Disable trashbin when testing orphaned shares deletion job 2015-04-08 13:04:06 +02:00
Vincent Petry
17b141337a Delete orphaned shares in a background job 2015-04-08 10:47:55 +02:00
Bjoern Schiessle
fac7ec3fc4 fix re-shares with encryption 2015-04-07 13:30:30 +02:00
Bjoern Schiessle
8b1a12a224 use loginHelper from base class 2015-04-07 13:30:30 +02:00
Bjoern Schiessle
391fab35f0 reset storage for each unit test 2015-04-07 13:30:30 +02:00
Thomas Müller
00338f9dca Removing files_encryption left overs 2015-04-07 13:30:28 +02:00
Morris Jobke
cfe241a959 Merge pull request #13964 from rullzer/capabilities
Add OCS sharing info to capabilities - take 2
2015-03-30 10:06:05 +02:00
Thomas Müller
4d12c4a38b Merge pull request #13938 from owncloud/deprecate-iappconfig
Deprecated \OCP\IAppConfig - add missing methods to IConfig
2015-03-27 16:07:41 +01:00
Morris Jobke
d082e37270 Merge pull request #15244 from owncloud/use_default_share_folder
always fall back to default share folder
2015-03-26 22:39:04 +01:00
Morris Jobke
e8109f0bc3 Merge pull request #13802 from owncloud/share-partfilepermissions
Fix share permission checks
2015-03-26 22:01:05 +01:00
Bjoern Schiessle
a3592534ef always fall back to default share folder 2015-03-26 21:56:44 +01:00
Robin Appelman
1be7da4a57 replace share proxy with hook 2015-03-26 19:56:57 +01:00
Robin Appelman
173c31e42a rename proxy test 2015-03-26 19:56:31 +01:00
Jenkins for ownCloud
b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Lukas Reschke
5f044ebf1b Add wrapper for Guzzle 2015-03-25 16:04:41 +01:00
Morris Jobke
09ea260957 Merge pull request #15160 from owncloud/deduplicate-external-manager-tests
Deduplicate external manager tests
2015-03-24 20:15:56 +01:00
Robin Appelman
1bd141b655 Merge pull request #15158 from owncloud/fix-failing-master
Fix failing master unit tests
2015-03-24 17:54:11 +01:00
Joas Schilling
8c33f05e93 Merge the two tests into one 2015-03-24 17:26:38 +01:00
Joas Schilling
7de15f3125 *cough* 2015-03-24 17:08:03 +01:00
Morris Jobke
2370af62ea Merge pull request #14998 from rullzer/ocs_api_new_url
OCS API should return fancy OC url
2015-03-24 17:04:31 +01:00
Morris Jobke
965d97a8f5 Merge pull request #14580 from owncloud/issue/13765-duplicate-remote-share
"Integrity constraint violation" when sharing the same item twice with the same user
2015-03-24 15:05:58 +01:00
Lukas Reschke
e2453d78c0 Properly catch whether a share is null
Despite it's PHPDoc the function might return `null` which was not properly catched and thus in some situations the share was resolved to the sharing users root directory.

To test this perform the following steps:

* Share file in owncloud 7 (7.0.4.2)
* Delete the parent folder of the shared file
* The share stays is in the DB and the share via the sharelink is inaccessible. (which is good)
* Upgrade to owncloud 8 (8.0.2) (This step is crucial. The bug is not reproduceable without upgrading from 7 to 8. It seems like the old tokens are handled different than the newer ones)
* Optional Step: Logout, Reset Browser Session, etc.
* Access the share via the old share url: almost empty page, but there is a dowload button which adds a "/download" to the URL.
* Upon clicking, a download.zip is downloaded which contains EVERYTHING from the owncloud directory (of the user who shared the file)
* No exception is thrown and no error is logged.

This will add a check whether the share is a valid one and also adds unit tests to prevent further regressions in the future. Needs to be backported to ownCloud 8.

Adding a proper clean-up of the orphaned shares is out-of-scope and would probably require some kind of FK or so.

Fixes https://github.com/owncloud/core/issues/15097
2015-03-24 11:21:58 +01:00
Roeland Jago Douma
bdde2156da Added extra unit test 2015-03-21 09:47:07 +01:00
Thomas Müller
afa8872955 Merge pull request #14857 from owncloud/preview-provider-registration-in-manager
Preview provider registration in manager
2015-03-20 16:34:22 +01:00
Vincent Petry
67160e0861 Do not automatically add "update" permission to shared mounts
In the past it seems the update permission was needed to be able to
rename shared mounts, but it doesn't seem to be the case any more.

Removing the "update" permission that used to be added automatically
fixes the read-only permission check when trying to overwrite a
read-only file over WebDAV.
2015-03-20 12:33:59 +01:00