Commit Graph

695 Commits

Author SHA1 Message Date
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
Vincent Petry eef5851a67 Fix share permission related unit tests 2015-03-20 11:30:51 +01:00
Thomas Müller 857b22c61b Merge pull request #15025 from rullzer/ocs_respect_enforced_date
Ocs respect enforced date
2015-03-19 17:06:04 +01:00
Robin Appelman be6edd465a Merge pull request #14537 from owncloud/oci-external-share
Fix external shares without password on oracle
2015-03-19 16:20:12 +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
Vincent Petry c2315aa015 Fix shared storage permission checks 2015-03-18 19:56:31 +01:00
Morris Jobke f4b6f3cfd1 fix unit tests 2015-03-17 18:55:44 +01:00
Joas Schilling 8ebb198ef3 Add a unit test for the naming conflict on the mountpoint name 2015-03-17 16:55:03 +01:00
Joas Schilling 3052b9571e Fix controller test 2015-03-16 12:45:18 +01:00
Roeland Jago Douma ec31ee9117 Mark functions private 2015-03-11 16:30:54 +01:00
Roeland Jago Douma e9a003fe21 Slight better formatting 2015-03-11 15:11:50 +01:00
Roeland Jago Douma 09ee297356 New array syntax 2015-03-11 15:02:55 +01:00
Roeland Jago Douma c985186246 Added new header 2015-03-11 15:02:55 +01:00
Roeland Jago Douma af76716775 Now added enabled element
This change allows for more generic parsing for the capabilities.
2015-03-11 15:02:55 +01:00
Roeland Jago Douma 39b0f0725e Add file_sharing info to capabilities
Display the capabilities regarding file sharing in the capabilities API.
This will allow the clients to provide users a better experince.
2015-03-11 15:02:55 +01:00
Joas Schilling 6a677ce8fe Do not make setupMounts() public just because of testing 2015-03-11 11:10:43 +01:00
Robin Appelman dcd2d7aff5 Add unit tests for external share mananger 2015-03-10 10:17:53 +01:00
Lukas Reschke 48243a2949 Allow iframes from same domain in share view
This is required because the PDF Viewer itself is embedded using an iframe from the same domain. The default policy is blocking this.

Going on further, we have to come up with a solution in the future how to handle previews by applications, one example might be that they call their own endpoint and not the generic share page to allow applications to have full control over how to display previews.

Anyways, to test this behaviour use a decent newer browser (such as Chrome 41) and share a PDF file, obviously the PDF viewer needs to be enabled as well. Without this patch publicly shared PDF files should not get previewed and an error is thrown. (if it isn't then your browser is probably not obeying our Content-Security-Policy and you might consider switching to another one ;))
2015-03-10 10:06:15 +01:00
Vincent Petry ec19d9c267 Add unit test for size propagation across share boundaries 2015-03-09 12:56:22 +01:00
Roeland Jago Douma 4436a9ce35 Shares should have a least read permission
* Throw 400 when a share is created or updated without read permissions
* Added unit tests
2015-03-01 17:13:17 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Joas Schilling ac5bb97d04 Reset the group backend aswell 2015-02-25 16:03:12 +01:00
Joas Schilling 993d89b3cc Extend the class so the Filesystem is cleaned up 2015-02-25 16:03:10 +01:00
Vincent Petry 4290e1990e Merge pull request #13829 from owncloud/appmanager-list
Better caching for enabled apps
2015-02-23 16:03:32 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Robin Appelman 5394a81c05 Dont fatal error test when encryption is enabled 2015-02-17 15:05:29 +01:00
Joas Schilling 9ccfbc14f6 Copy sharing related activity code to Files_Sharing activity extension 2015-02-13 11:16:43 +01:00
Lukas Reschke a67627140c Revert "Add OCS sharing info to capabilities" 2015-02-07 00:12:26 +01:00
Roeland Jago Douma fe2aca5aa8 Updated unit tests 2015-02-06 12:13:53 +01:00
Roeland Jago Douma bcae79a85a Split up unit tests 2015-02-04 15:49:20 +01:00
Roeland Jago Douma 083ebca812 Added unit test to test getCapabilities for files_sharing 2015-02-04 14:56:31 +01:00
Vincent Petry acec40fe5a Merge pull request #13561 from owncloud/trash-finaldeletewhencrossstoragefix
Call final unlink in trash wrapper's storage
2015-01-27 17:05:38 +01:00
Thomas Müller 1add2f3f58 Merge pull request #13679 from owncloud/public-disablesharejsplugin
Disable JS plugin for sharing in public mode
2015-01-27 09:33:38 +01:00
Vincent Petry 182b1937bb Only reload file list after remote share accept request returns
When accepting a remote share, an ajax request is sent to the server.
Only once this request returns should the file list be reloaded.
2015-01-26 21:22:22 +01:00
Vincent Petry 86689ef400 Disable JS plugin for sharing in public mode
This removes the logic that registers the share action and modifies the
rows. Share actions aren't needed in the public file list.
2015-01-26 19:55:48 +01:00
Bjoern Schiessle 67da1f7e5a certificate manager only needs the user-id, no need to pass on the complete user object 2015-01-26 16:58:52 +01:00
Bjoern Schiessle 73a058e301 by default send mail for new server-to-server share 2015-01-23 21:59:07 +01:00
Vincent Petry 1a06edd712 Unregister trashbin storage wrapper at the end of tests
Some more tests that uses the storage wrapper now remove it afterwards
2015-01-23 15:36:09 +01:00
Bjoern Schiessle 7216983a08 delete all server-to-server shares if a user gets deleted 2015-01-21 17:11:34 +01:00
Thomas Müller 8ba42abbe4 Merge pull request #13432 from owncloud/animate_gifs_public_sharing
show animated gifs on public sharing page
2015-01-21 17:09:46 +01:00
Thomas Müller 9921308c62 Merge pull request #13540 from owncloud/s2s-fixpasswordfromdialog
External share dialog must properly read entered password
2015-01-21 16:51:56 +01:00
Vincent Petry c48307027c Fixed external cache test namespace 2015-01-21 15:52:56 +01:00
Vincent Petry 9fbdd1072e Fix webdav mkdir for remote shares 2015-01-21 15:14:57 +01:00
Vincent Petry f3d696599a Add unit test for external share JS dialog
Moved external share JS code into a small plugin to make it testable.

Added unit test for the external share dialog logic + ajax calls.
2015-01-21 11:26:54 +01:00
Georg Ehrke 374ddbff55 show animated gifs on public sharing page 2015-01-19 16:20:06 +01:00
Bjoern Schiessle 15ae6b47ed replace hook with storage wrapper 2015-01-19 09:16:15 +01:00
Thomas Müller 25806346c2 remove deprecated code - fixes #13119 2015-01-14 13:56:49 +01:00
Bjoern Schiessle d50e70ba3a set accept to 1 (=true) for all server-to-server shares on update, at this point in time all shares are created by the first version of server-to-server sharing and are accepted if they were added to the table 2015-01-13 17:24:00 +01:00
Bjoern Schiessle b6f63e9b3d don't delete share table entries for the unique name if re-share permission was removed 2015-01-07 16:36:13 +01:00
Morris Jobke 510488ad3e Merge pull request #12942 from owncloud/favs-missingsharedsubdirs
Fix issues with searchByTag in shared storage
2014-12-21 10:38:34 +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
Vincent Petry 11b3aa2dbe Fix issues with searchByTag in shared storage 2014-12-18 17:27:56 +01:00
Morris Jobke d41082f4d6 first step to drop \OCP\Config:: in favour of IConfig 2014-12-17 11:12:37 +01:00
Morris Jobke 29e1c3a898 Merge pull request #12795 from owncloud/files-layoutchanges
Move file thumbnail element into the label tag
2014-12-13 09:00:43 +01:00
Vincent Petry 4b57892c4e Merge pull request #12778 from owncloud/searchbytags2
Added searchByTags to view, storage and cache
2014-12-12 14:27:19 +01:00
Robin Appelman 3bf0922b13 Merge pull request #12527 from owncloud/js-pluginsystem
Simple Plugin system for Javascript
2014-12-12 11:43:31 +01:00
Vincent Petry 15ecb28d50 Make $userId mandatory for searchByTags
$userId is now a mandatory parameter for searchByTags.

Also fixed some places in the code where the argument was missing (Node
API and View)
2014-12-12 11:18:35 +01:00
Vincent Petry 81e9d43e23 Move file thumbnail into the label element 2014-12-11 18:21:25 +01:00
Vincent Petry 25dde7e93b Added searchByTags to view, storage and cache 2014-12-11 17:38:50 +01:00
Vincent Petry bf887eca8b Remove obsoleted filelist prototype backup in tests 2014-12-04 18:39:20 +01:00
Bjoern Schiessle 698ecbf308 OCS API for server-to-server sharing 2014-12-04 13:18:13 +01:00
Vincent Petry c02ef69521 Simple Plugin system for Javascript 2014-12-01 16:20:44 +01:00
Joas Schilling 2c39aec8cb Replace deprecated constant with new class constant 2014-11-25 16:30:21 +01:00
Morris Jobke 6fb2477fb7 Merge pull request #12262 from owncloud/removeAbsoluteDirectoryPathFromTemplate
Don't disclose relative directory path for single shared files of user
2014-11-25 10:09:16 +01:00
Morris Jobke 46e6104795 Merge pull request #12297 from owncloud/issue/10991-all-testcase
Issue/10991 all testcase
2014-11-20 14:53:18 +01:00
Vincent Petry 63fa8ec69a JSHint fixes in sharedfilelistSpec unit test file 2014-11-19 17:44:05 +01:00
Vincent Petry 98ec0451be Remove delete button in shared with others list
Whenever a file is shared with others or with link, a delete button used
to be visible that triggered a direct deletion.

This button has been removed to avoid accidental deletion from people
who might believe it was an unshare button. Unsharing is still possible
inside the share dropdown.
2014-11-19 17:42:57 +01:00
Joas Schilling 76ebd3a050 Make apps/ extend the \Test\TestCase and fix overwritten methods 2014-11-19 14:52:09 +01:00
Lukas Reschke f3ab4f3faf Don't disclose relative directory path for single shared files of user
The "dir" key is used within the public sharing template to indicate in which directory the user currently is when sharing a directory with subdirectories. This is needed by the JS scripts.

However, when not accessing a directory then "dir" was set to the relative path of the file (from the user's home directory), meaning that for every public shared file the sharee can see the path.
(For example if you share the file "foo.txt" from "finances/topsecret/" the sharee would still see the path "finances/topsecret/" from the shared HTML template)

This is not the excpected behaviour and can be considered a privacy problem, this patch addresses this by setting "dir" to an empty key.
2014-11-18 18:51:57 +01:00
Morris Jobke 230e517f35 Merge pull request #12220 from owncloud/remove-unused-code
Remove unused code
2014-11-18 10:36:32 +01:00
Morris Jobke 146cb920c9 Merge pull request #12218 from owncloud/issue/10991-fixes
Issue/10991 Make unit tests pass on windows
2014-11-17 16:44:45 +01:00
Lukas Reschke 8dbedbb849 Remove unused code
We don't support direct updates from older ownCloud versions except the previous one therefore this code is unused and can be removed.
2014-11-17 14:01:39 +01:00
Joas Schilling a3a064fe96 Skip some more tests on Windows which just can not work at all 2014-11-17 10:48:06 +01:00
Vincent Cloutier fad621140b Added download size on public sharing 2014-11-14 16:26:59 +01:00
Lukas Reschke 988c85d292 Refactor file sharing public link handling
fixes download issue introduced by #10755

Conflicts:
	apps/files_sharing/public.php
2014-11-14 16:26:59 +01:00
Morris Jobke 2023878d53 Merge pull request #10966 from owncloud/storage-root-share-permissions
Dont' use mountpoint permissions as share permissions for external storages
2014-11-10 13:11:22 +01:00
Robin Appelman 0f3fd89f7d Fix sharing tests 2014-11-06 18:31:41 +01:00
Robin Appelman 7ecd220715 Setup shared mounts for the correct user when setting up the filesystem for the non-logged in user 2014-11-06 18:31:40 +01:00
Robin Appelman 9c79c2fa17 Dont make real users in tests 2014-11-06 18:31:40 +01:00
Robin Appelman 83126ab675 Add unit tests 2014-10-31 15:22:08 +01:00
Thomas Müller f776bcd4a0 remove unnecessary require calls - the ownCloud class loader is supposed to take care of this 2014-10-30 17:20:40 +01:00
Thomas Müller d9907b6fa3 move some deprecated usage of OC_Config and OC_AppConfig to \OC::server 2014-10-20 14:44:44 +02:00
Jörn Friedrich Dreyer cb3a4d22b1 make tests compatible with hook based skeleton generation 2014-10-20 11:29:20 +02:00
Jörn Friedrich Dreyer 9b0f0df7f5 make skeleton compatible with objectstore
suspend encryption proxy when copying skeleton
2014-10-20 11:28:36 +02:00
Bjoern Schiessle 3431d547a9 fix performance issues 2014-10-10 12:16:26 +02:00
Lukas Reschke 8c8e5c168e Merge pull request #10107 from owncloud/sharing_group_shares
[sharing] group shares
2014-09-29 20:26:41 +02:00
Bjoern Schiessle 6e7acb8ae0 some small fixed, suggested by scrutinizer 2014-09-29 11:23:18 +02:00
Bjoern Schiessle e5f0dded84 throw a exception if we can't handle the provided path 2014-09-29 11:13:06 +02:00
Bjoern Schiessle 52b6469b0c call \OCP\Share::getItemsSharedWithUser() to get exclude list, this way all checks are executed, e.g. to check if the share is really visible 2014-09-25 14:26:31 +02:00
Bjoern Schiessle 5c7fe91041 clear share table after each test run 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
Vincent Petry 05cf940983 Tentative fix for legacy file actions unit test side effect
Sometimes the JS unit test with legacy file actions fail.

This fix runs the legacy file actions tests on a dummy instead of the
real one.
2014-09-16 15:38:44 +02:00
Robin Appelman 2fcedcc503 fix test 2014-08-31 10:47:50 +02:00
Lukas Reschke 594078e22f Fix copyright 2014-08-18 16:52:48 +02:00
Bjoern Schiessle 193a0b1a17 fix broken unit tests 2014-08-18 16:52:48 +02:00
Bjoern Schiessle c25915cde4 update unit tests with configurable share folder 2014-08-18 16:52:48 +02:00
Morris Jobke 676fa459d7 Minor fixes
* instanceof \OC\Files\View
* fix misplaced paranthesis
* remove misplaced character in comment
2014-08-05 16:53:28 +02:00
Jörn Friedrich Dreyer 1af436cb59 add test for search() in shared cache 2014-07-31 15:07:49 +02:00
Björn Schießle c53b56e313 Merge pull request #9798 from owncloud/ocs_share_api_add_expire_date
[share api] add OCS api call to set expire date for link shares
2014-07-28 17:28:32 +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 c22b5c7884 fix sharing update, add proper escaping 2014-07-24 20:16:40 +02:00
Vincent Petry 658828867c Correctly return the owner display name for children of shares 2014-07-16 12:07:02 +02:00
Thomas Müller 7159d6118e reduce share action text to the user name only 2014-07-14 21:11:50 +02:00
Vincent Petry 22653e21a2 Propagate file action changes to the file lists
Whenever an app needs to register an event late, it does that on the
original file actions object.

Since the file actions that the file list work on is a merged list, not
the original one, the registration event needs to be propagated there as
well.
2014-07-09 12:26:33 +02:00
Vincent Petry f4f52cf242 Fix update cleanup to only affect file and folders
Fix bug in the SQL query that cleans up stray shares for removed
files/folders, which is now correctly limited to that item type instead
of also removing all other share types.
2014-07-08 14:53:31 +02:00
Vincent Petry 8ddff52c51 Do not show recipient for link shares in file list
In the "Shared with link" section, the share_with field can contain a
value when a password was set.

This fix prevents this value to be shown as it is not intended for the
end user.
2014-07-07 16:33:23 +02:00
Bjoern Schiessle 3b9fa81581 if a folder gets deleted we unshare all shared files/folders below 2014-07-04 10:34:54 +02:00
Vincent Petry 615d037d3e Merge pull request #9364 from owncloud/sharing_rename_mount_points
[sharing] rename mount point of children if parent was renamed
2014-07-02 18:48:07 +02:00
Vincent Petry f4eb90e229 Merge pull request #9311 from owncloud/storage-not-available
Handle storages not being available in webui and webdav
2014-07-02 18:15:58 +02:00
Bjoern Schiessle ea31ab7b5c rename mount point of children if parent was renamed 2014-07-02 15:39:38 +02:00
Robin Appelman 0008db9995 Fix unit test 2014-07-02 14:39:45 +02:00
Vincent Petry 025b71d068 Use fileActionsReady to re-render sharing icons
Whenever file actions are modified, either by registering new actions or
when appending a new page of entries, the sharing app is now notified so
it can correctly refresh the sharing icon status.

Additionally, the core's loadIcons() method is also used to load the
existing shares and also refresh the sharing icons afterwards.
2014-07-01 21:32:04 +02:00
Jan-Christoph Borchardt b7cb4f5a63 fix trailing whitespace noted by Scrutinizer 2014-06-27 18:25:56 +02:00
Vincent Petry 586b3a9683 Sync file list with file actions
Whenever file actions are registered later, now the file lists are
automatically notified.

Added FileActions.addUpdateListener() to be able to receive such
notifications.

This removes the need for apps to manually call FileActions.display()
after registering new actions.

This fixes issues with race conditions when file actions are
registered after the file list was already rendered.
2014-06-27 13:41:01 +02:00
Thomas Müller ef4057d382 remove pointless require - we should kill all require_once like that in our tests 2014-06-27 09:30:42 +02:00
Björn Schießle 1822bba5e9 Merge pull request #9193 from owncloud/sharing_etag_propagation
make sure that the etags get propagated correctly
2014-06-26 10:26:24 +02:00
Vincent Petry 93a6792da7 Merge pull request #9205 from owncloud/remoteshare-fixurlpath
Fix parsing of remote URL when mounting remote shares
2014-06-25 19:59:39 +02:00
Bjoern Schiessle 38ff8173ab make sure that hooks are registered for the tests 2014-06-25 15:20:52 +02:00
Vincent Petry d22559200c Fix parsing of remote URL when mounting remote shares
This fix allows for having the remote ownCloud instance live in a
subpath like "http://example.com/basedir/subdir/owncloud".
Such URLs are now parsed correctly.

Added unit test for URL parsing.
2014-06-25 15:11:43 +02:00
Bjoern Schiessle a0b85fc5e4 make sure that during share and unshare the etags get propagated correctly 2014-06-25 12:11:56 +02:00
Bjoern Schiessle 3fc7357ade add/update unit tests 2014-06-24 14:00:15 +02:00
Vincent Petry 75a53b3c49 Merge pull request #8901 from owncloud/permissions-update-cache
Save the permissions in the filecache if it's not saved yet
2014-06-11 18:28:55 +02:00
Bjoern Schiessle 1d9b4aadbf no need to prepare a statement twice 2014-06-10 14:46:47 +02:00
Thomas Müller 961e4e5c7c adjust unit test assert values 2014-06-09 12:44:40 +02:00
Thomas Müller aa38bd2b31 adding PHPDoc 2014-06-09 12:34:35 +02:00
Bjoern Schiessle 86d7371d0c fix unshareFromSelf() 2014-06-06 09:56:02 +02:00
Bjoern Schiessle 09970e1816 update unit tests and make sure that we return the right permissions for files within a shared folder and for the shared folder itself 2014-06-06 09:56:02 +02:00
Bjoern Schiessle ca6631a710 add some tests 2014-06-06 09:56:01 +02:00
Robin Appelman 42a362f249 Fix phpdoc and comments 2014-06-06 09:56:01 +02:00
Bjoern Schiessle 501f98f084 update share API tests, file shares never have delete permissions 2014-06-06 09:56:00 +02:00
Bjoern Schiessle 844b1e3fc6 add additional unit tests 2014-06-06 09:56:00 +02:00
Bjoern Schiessle bf5e9357fc don't allow to share single files with delete permissions, user should only be possible to unshare a single file but never to delete it 2014-06-06 09:55:59 +02:00
Vincent Petry e0c4e960d9 Merge pull request #8861 from owncloud/share-overview-linklist
Added Shared with link sidebar section in files app
2014-06-05 10:59:54 +02:00
Morris Jobke ca43fba513 Merge pull request #8791 from owncloud/share-overview-sharewithstatus
Update share action text to display owner/recipients
2014-06-04 17:04:30 +02:00
Vincent Petry b3fdda1751 Added "Shared with link" sidebar section in files app
Added section to only show link shares.

Please note that the filtering is currently done on the client side
which might not be the most efficient way of doing it.
2014-06-04 11:10:11 +02:00
Vincent Petry 07f1b263c9 Use recipient display names when updating shares in the UI
Since OC.Share didn't have any array containing the list of shares for
the current file, OC.Share.currentShares has been introduced to contain
the full share item structure instead of the reduced one
OC.Share.itemShares.

The event "sharesChanged" is now passing OC.Share.currentShares, which
itself includes the display name to be displayed for the recipients in
the action icon.
2014-06-04 10:37:04 +02:00
Vincent Petry 1297b2b883 Multiple fixes to sharing overview
- scrolling to next page now correctly renders share icons
- reshareing/unsharing a reshare will now still keep "Shared by" label
2014-06-03 11:04:57 +02:00
Vincent Petry 640fbc016d Now using shareOwner for the share owner
Makes it consistent with the regular file list fileData
2014-06-02 18:52:31 +02:00
Morris Jobke da090099f4 fix unit tests 2014-06-02 18:39:52 +02:00
Vincent Petry 0944565f60 More unit tests and fixes for share 2014-06-02 18:08:56 +02:00
Vincent Petry d677e3860d Added unit tests for share.js and share icon 2014-06-02 15:59:06 +02:00
Vincent Petry 5e4e773446 Removed "Share with" column 2014-05-30 10:06:30 +02:00
Vincent Petry e084183d1e Added owner display name in action 2014-05-30 10:06:29 +02:00
Vincent Petry 1d9129eac3 Sharing overview fixes and unit tests
- Fixed renaming and fileActionsReady event
- Added unit tests for shares list
- Fixed public page with defer
- Fixed file actions in sharing overview
- Fixed sharing counterpart list (10 entries max)
- Fixed file path attribute to be used in download action
- Fix sharing list headers
- OC.Share icons now operate on fileList instance
- Fix OC.Share.updateIcon when more than one list in DOM
2014-05-30 10:06:29 +02:00
Bjoern Schiessle 95bd7fee9c don't lose file size during rename 2014-05-26 14:11:33 +02:00
Bjoern Schiessle 12338e0ef0 allow admin to disable sharing for specific groups of users 2014-05-22 10:43:44 +02:00
Bjoern Schiessle 5f403f3e92 move the mount point up if a share is mounted to a subfolder and the subfolder no longer exists 2014-05-21 13:19:17 +02:00
Morris Jobke dc36d30953 Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
2014-05-19 17:50:53 +02:00
Robin McCorkell e7aebc5c32 Fix whitespace issues 2014-05-16 22:23:36 +01:00
Robin McCorkell c4f1de63a8 Fix PHPDoc in /apps 2014-05-16 22:21:57 +01:00
Björn Schießle 42b99b6d0f Merge pull request #8555 from owncloud/sharing_default_expire_only_public_links
use default expire date only for link shares
2014-05-16 14:57:11 -04:00
Bjoern Schiessle 7a48f24459 use default expire date only for link shares 2014-05-16 18:12:13 +02:00
Bjoern Schiessle b6e14af861 allow admin to enforce passwords for public link shares 2014-05-16 17:41:09 +02:00
Thomas Müller e0dd69e4e6 remove legacy aka deprecated code: OC_FilesystemView 2014-05-12 16:30:39 +02:00
Vincent Petry f73a168694 Added unit test for sharing ext storage mount points 2014-05-08 11:00:19 +02:00
Bjoern Schiessle 20e4ad382b get the correct owner path for part files 2014-04-30 12:49:16 +02:00
Bjoern Schiessle b102222fed split-up the update script and add unit tests for it 2014-04-23 12:54:26 +02:00
Bjoern Schiessle fb88aba8f4 some fixes to make the gallery work, this made it necessary to adjust some tests and the encryption code 2014-04-23 12:54:26 +02:00
Bjoern Schiessle d468cdacf2 add unit tests which got lost during rebase 2014-04-23 12:54:26 +02:00
Bjoern Schiessle 652d417a58 we don't allow to share a folder if it contains a share mount point 2014-04-23 12:54:26 +02:00
Bjoern Schiessle ed981294f1 fix share api tests 2014-04-23 12:54:25 +02:00
Robin Appelman 7dafdfbe88 add tests for sharing files the users doesn't have access to 2014-04-03 13:14:34 +02:00
Vincent Petry d811026ec9 Merge pull request #7935 from owncloud/getpath-shared
Make getPath work for shared files
2014-04-01 21:59:09 +02:00
Vincent Petry 27eff1ac30 Merge pull request #7293 from owncloud/update-shares-postgres
fix update to remove shares where file doesn't exist on postgres
2014-04-01 14:56:37 +02:00
Robin Appelman fe78d963d9 Implement getPath for shared files 2014-03-28 15:26:15 +01:00
Vincent Petry cbfd16089b Fixed share upgrade cleanup tests to use the correct ids 2014-03-26 09:29:28 +01:00
Vincent Petry ec9260647a Fixed share updater unit test
Now using \OC_DB::insertId() to retrieve the generated ids because
Oracle ignores the passed values.
2014-03-25 20:18:58 +01:00
Bjoern Schiessle 31681a3a27 finally fix the paths for the OCS Share API 2014-03-25 17:52:45 +01:00
Bjoern Schiessle 3653a51af2 fix path creation for re-shares, issue #7662 2014-03-25 17:48:50 +01:00
Bjoern Schiessle 9d32475260 finally fix the paths for the OCS Share API 2014-03-13 15:16:59 +01:00
Vincent Petry 02be15ce2f Added backticks for Oracle in sharing updater unit test 2014-03-13 13:09:32 +01:00
Morris Jobke 4bb303cbd6 Clean up database before setup the database for testing 2014-03-13 13:09:32 +01:00
Morris Jobke ec54bc7709 Refactor update script to class and add unit test 2014-03-13 13:09:32 +01:00
Bjoern Schiessle 36885dc64c fix path creation for re-shares, issue #7662 2014-03-11 12:58:46 +01:00
Bjoern Schiessle 9548670da7 we need the file_source to delete a share successfully 2014-03-10 11:35:54 +01:00
Bjoern Schiessle e3f676e009 fix path in sharing results if it is a file in the Shared folder 2014-02-25 17:27:23 +01:00
Bjoern Schiessle 0c0e4fced5 fix test so that it doesn't depend on the array order 2014-02-21 13:37:47 +01:00
Bjoern Schiessle 6ca4d3bfde fix usersPath and add unit tests 2014-02-21 13:37:46 +01:00
Jörn Friedrich Dreyer 2a6a9a8cef polish documentation based on scrutinizer patches 2014-02-06 17:02:21 +01:00
Vincent Petry fa5ddc3e18 Fixed searchByMime in shared cache
- searchByMime now correctly returns files recursively search through
  all the dirs
- added unit test for searchByMime
2014-02-05 13:29:06 +01:00
Vincent Petry 963ee31efb Removed numRows usage from encryption app
numRows on Oracle always seem to return 0.

This fix removes numRows usage from the encryption and sharing app.

This fixes unit tests and potentially the encryption app itself
(migration status) when running on Oracle
2013-12-19 15:51:24 +01:00
Vincent Petry e9255e5d57 Added unit test for sharing permissions 2013-12-10 11:19:09 +01:00
Vincent Petry da126f1692 Fixed unit tests for files sharing watcher 2013-11-06 09:39:52 +01:00
Vincent Petry 9f4fd0161e Added unit tests for shared files watcher
- Added base class for sharing unit tests
- Added unit tests for shared files watched to check for folder size
  propagation
2013-11-05 19:30:52 +01:00
Bjoern Schiessle 99738ae0bc add test for the reshare option 2013-10-17 12:23:37 +02:00
Bjoern Schiessle ab6ee79e11 adjust tests 2013-10-17 11:23:07 +02:00
Björn Schießle a6d9319328 Merge pull request #5269 from owncloud/ocs_share_api_add_received_from
ocs share api: add "received_from" and "received_from_displayname" field
2013-10-15 02:17:23 -07:00
Björn Schießle 4336d42ab0 Merge pull request #5233 from owncloud/enc_filter_users
only encrypt file to users with encryption keys
2013-10-11 01:48:02 -07:00
Bjoern Schiessle 7a1705d28e fix api tests 2013-10-11 10:28:01 +02:00
Bjoern Schiessle a1719deabe make sure that we are logged in ad user1 while performing the tests 2013-10-10 10:47:35 +02:00
Thomas Müller 8a06f2e128 php 5.3 compatibility for Test_Files_Sharing_Api 2013-10-08 23:05:19 +02:00
Bjoern Schiessle 2e7f481e6b update tests 2013-10-04 14:32:15 +02:00
Bjoern Schiessle 6d830087db add testUpdateShareUpload() 2013-09-30 12:57:55 +02:00
Bjoern Schiessle 03db954e1a add getShareFromFolder() test 2013-09-30 12:38:36 +02:00
Bjoern Schiessle 9a2e82c3c5 Make sure that testDeleteShare() has some shares to delete 2013-09-30 12:23:44 +02:00
Thomas Müller 258e8d58da flipping arguments on assertEquals() - first argument contains the expected value and second argument contains the value to be asserted 2013-09-29 22:20:42 +02:00
Thomas Müller 63ea6844e8 - adding unit test testGetShareFromUnknownId()
- fixing getShareFromId() for Oracle
- fixing error message
2013-09-29 22:16:48 +02:00
Bjoern Schiessle f935a38559 add some comments 2013-09-27 14:04:28 +02:00
Bjoern Schiessle 5b4f515e7b add test getShareFromId 2013-09-27 14:01:04 +02:00
Bjoern Schiessle 4077ed6ddb add some additional assertions to the tests 2013-09-25 15:05:23 +02:00
Thomas Müller 333d3eda99 add error message to the assert 2013-09-25 09:43:16 +02:00
Bjoern Schiessle 7626540679 make sure that files are shared correctly before each test and unshared again after the test 2013-09-20 12:38:23 +02:00
Bjoern Schiessle bd09910f67 disable encrpytion app before performing tests 2013-09-20 11:24:18 +02:00
Bjoern Schiessle 57092e817f disable encryption app for share API tests 2013-09-19 20:14:34 +02:00
Bjoern Schiessle 8cf8c0b161 remove some unused variables 2013-09-19 14:42:34 +02:00
Bjoern Schiessle b947aab802 some unit test for the new ocs share api 2013-09-19 14:39:51 +02:00