Commit Graph

78 Commits

Author SHA1 Message Date
Joas Schilling 59c657da53 Merge pull request #15772 from owncloud/issue-15771-dont-restrict-permissions-for-share-owner
Do not restrict permissions for the original owner
2015-05-04 15:07:37 +02:00
Joas Schilling 09d479e79d Add a test to share a subfolder of a folder shared with the owner by group 2015-04-29 13:33:20 +02:00
Morris Jobke 8c7db2536d Merge pull request #15596 from owncloud/issue/15589
Correctly generate the feedback URL for remote share
2015-04-29 10:52:43 +02:00
Joas Schilling b55ef51a27 Add tests for the correct share id on the call aswell 2015-04-28 14:56:13 +02:00
Roeland Jago Douma 02269b6464 Added unit test 2015-04-28 14:00:36 +02:00
Joas Schilling 02c60949dd make scrutinizer happy 2015-04-28 11:28:54 +02:00
Joas Schilling d146c13abd Add tests for the remote sharing url 2015-04-28 11:28:54 +02:00
Bjoern Schiessle 332ea77865 only create a db entry for the user in case of a name conflict on group share 2015-04-09 11:16:08 +02:00
Roeland Jago Douma 3b1f0e6019 Fix unit test 2015-03-30 21:18:24 +02:00
Roeland Jago Douma b0aa17b13f OCS Fixes to allow setting of password without removing additional settings
- Added setPassword to share.php
- Fixed OCS API call
- Added unit tests
2015-03-30 14:00:50 +02:00
Morris Jobke f4dc9e6bf3 Merge pull request #15155 from owncloud/share-donotreturntrashedfiles
Do not return shares for files outside "files"
2015-03-27 17:05:14 +01: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
Vincent Petry 23cb8112fc Add logout in share test to avoid nasty side effects 2015-03-27 15:54:29 +01:00
Vincent Petry 80f83ab5e0 Do not return shares for files outside "files" 2015-03-27 13:25:23 +01:00
Roeland Jago Douma dd3307dd19 Added unit test
Tests added to make sure that removing an expire date when this is
enforced is not allowed.
2015-03-19 10:47:09 +01:00
Morris Jobke fbea83d4eb fix failing unit test 2015-03-17 17:26:03 +01:00
Joas Schilling c17b236c19 Add a test for the post_shared hook shareType 2015-02-09 13:12:34 +01:00
Vincent Petry 8fa3e7a6bf Do not retrieve shares through group if user has no group 2015-01-23 15:11:06 +01:00
Vincent Petry 9f137ac259 Fix reshare permission change to not impair other deletion code
A recent change that prevents reshare permission changes to delete group
share children had the side-effect of also preventing group share
children deletion when it needed to be done.

This fix adds an extra flag to isolate the "reshare permission change"
deletion case and keep the other ones as they were before, not only to
fix the regression but also fix other potential regressions in code that
uses this method.

Also updated the comment because now Helper::delete() is no longer
limited to reshares but also applies to group share children.
2015-01-22 10:12:47 +01:00
Vincent Petry 40931a8b0d Fix getItemSharedWithUser for groups
Fixed SQL query for whenever a user has more than one group.
Added missing $owner where clause for group lookup.
Added unit tests for the group cases.
2015-01-16 18:11:13 +01:00
Bjoern Schiessle 24993280ed Next step in server-to-server sharing next generation, see #12285
Beside some small improvements and bug fixes this will probably the final state for OC8.

To test this you need to set up two ownCloud instances. Let's say:

URL: myPC/firstOwnCloud user: user1
URL: myPC/secondOwnCloud user: user2
Now user1 can share a file with user2 by entering the username and the URL to the second ownCloud to the share-drop-down, in this case "user2@myPC/secondOwnCloud".

The next time user2 login he will get a notification that he received a server-to-server share with the option to accept/decline it. If he accept it the share will be mounted. In both cases a event will be send back to user1 and add a notification to the activity stream that the share was accepted/declined.

If user1 decides to unshare the file again from user2 the share will automatically be removed from the second ownCloud server and user2 will see a notification in his activity stream that user1@myPC/firstOwnCloud has unshared the file/folder from him.
2014-12-19 15:20:24 +01:00
Joas Schilling 2c39aec8cb Replace deprecated constant with new class constant 2014-11-25 16:30:21 +01:00
Bjoern Schiessle a7ebfe87c9 also check for the correct owner if it was submitted 2014-11-21 16:17:37 +01:00
Joas Schilling 6202ca33ba Make remaining files extend the test base 2014-11-19 14:53:59 +01:00
Bjoern Schiessle 01c50d242b use the new base class for unit tests 2014-11-18 11:46:28 +01:00
Bjoern Schiessle 5192641447 make sure that we don't find the wrong shares if a user and a group have the same ID 2014-11-18 11:03:08 +01:00
Bjoern Schiessle 72319bbc98 fix unit tests 2014-09-24 14:02:02 +02:00
Bjoern Schiessle 9105e17307 unit tests for grouping of shares pointing to the same source 2014-09-22 17:54:47 +02:00
Jörn Friedrich Dreyer f551917a3c kill OC::$session
maintain deprecated \OC::$session when getting or setting the session via the server container or UserSession

restore order os OC::$session and OC::$CLI

remove unneded initialization of dummy session

write back session when $useCustomSession is true

log warning when deprecated app is used
2014-08-29 10:22:21 +02:00
Björn Schießle c35d60f6d8 Merge pull request #9915 from suraia/unsharefromself-source
Allow specifying the item source in unshareFromSelf().
2014-08-27 10:31:35 +02:00
Michael Kuhn 0a77a5ec19 Add unit tests for new unshareFromSelf() functionality. 2014-08-23 12:05:19 +02:00
Morris Jobke 38e309b0fe Merge pull request #9970 from owncloud/sharing_set_expire_date
Sharing set expire date
2014-07-30 14:37:16 +02:00
Bjoern Schiessle 67e302885c remove share permission if user is excluded from sharing 2014-07-29 10:08:08 +02:00
Bjoern Schiessle 1bba266417 add unit test 2014-07-28 22:45:03 +02:00
Bjoern Schiessle ecc1f92bb6 add OCS api call to set expire date for link shares 2014-07-25 13:38:18 +02:00
Bjoern Schiessle f15d7dfec0 only expire link shares 2014-06-06 15:47:37 +02:00
Bjoern Schiessle 6578f00b4b unify share settings 2014-06-05 15:49:34 +02:00
Bjoern Schiessle bc0292c16d always return an array 2014-03-25 17:47:24 +01:00
Bjoern Schiessle cf7ef0d356 fix sharing unit tests 2014-02-21 13:36:00 +01:00
Scrutinizer Auto-Fixer adaee6a5a1 Scrutinizer Auto-Fixes
This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720

Enabled analysis tools:
 - PHP Analyzer
 - JSHint
 - PHP Copy/Paste Detector
 - PHP PDepend
2014-02-19 09:31:54 +01:00
Thomas Müller a3ea5aa2ac fixing comment + adding unit test for checkPasswordProtectedShare 2014-01-21 12:07:08 +01:00
ben-denham 30f77f53d5 updated the unit test for OCP\Share::unshareAll() to verify that shares by all users are removed for an item. 2014-01-10 14:08:29 +13:00
Andreas Fischer 8872b881cc Add tests for OCP\Share::unshareAll(). 2013-11-03 12:31:53 +01:00
Andreas Fischer 07714d9a72 Tests whether expired/valid link share is still accessible. 2013-09-16 21:24:16 +02:00
Andreas Fischer 294f3632e0 Calculate dateInPast and dateInFuture. 2013-09-12 23:43:21 +02:00
Andreas Fischer 261766fe49 Add comment explaining how $dateInFuture was picked. 2013-09-12 23:43:20 +02:00
Andreas Fischer f567bd1b8a Coding style: { for methods start are supposed to be on the same line. 2013-09-12 23:43:20 +02:00
Andreas Fischer fb650deaf7 Expiration tests for sharing with groups. 2013-09-12 23:43:20 +02:00
Andreas Fischer cf97eac401 Do not repeat shareUserOneTestFileWithUserTwo() code. 2013-09-12 23:43:20 +02:00
Andreas Fischer e4b334c3f1 Make dates test class properties. 2013-09-12 23:43:20 +02:00