Commit Graph

308 Commits

Author SHA1 Message Date
Michael Gapczynski 5f462ec6f7 Fix - "Correct checking item source for share from same owner when generating item target" 2012-10-06 18:13:11 -04:00
Michael Gapczynski 68c8faf39c Correct checking item source for share from same owner when generating item target 2012-10-02 16:37:39 -04:00
Björn Schießle 431d92e7b2 we are sharing the same file again if item_source of the already shared file and the newly shared file is the same. Therefore we can use the same target name 2012-10-02 21:37:10 +02:00
Björn Schießle db954f5aba remove unnecessary code and add missing items to select statement 2012-10-02 18:59:20 +02:00
Björn Schießle 3e3038cafc merge all possible conflicts into on array 2012-10-02 13:10:46 +02:00
Björn Schießle c6c0fcc7c8 We can't rely on the assumption that if the matching target is from the same owner that the share type will be different.
Files in different folders can have the same name. Therefore also a unique name has to be generated if the matching
target it from the same user. Also for folders and files with the same name a unique target name has to be generated

If matching target is from the same owner, use the same target. The share type will be different so this isn't the sa
2012-10-02 11:41:26 +02:00
Michael Gapczynski b4e40b1c21 Fix unsetting share expiration date 2012-09-26 00:09:35 -04:00
Michael Gapczynski f967bfc956 Properly format the share expiration time for the database, fixes bug oc-1779 2012-09-25 23:54:46 -04:00
Michael Gapczynski 60feaf9abf Merge branch 'master' into share_expiration
Conflicts:
	core/js/share.js
	lib/util.php
2012-09-12 01:06:57 -04:00
Michael Gapczynski 8f0354bcdd Temporarily disable sharing with contacts and emails, will come in next release 2012-09-12 01:02:08 -04:00
Michael Gapczynski 37f0b85d3f Fix problem with non share collection item types being treated as collections 2012-09-11 00:37:31 -04:00
Michael Gapczynski 6c17a4cb77 Don't display actions for children in shared collections, show the parent collection the child is shared in 2012-09-09 14:44:08 -04:00
Michael Gapczynski 13d513c17c Fix shared collection item searching 2012-09-09 11:50:12 -04:00
Michael Gapczynski 3e7951e1e6 Normalize the file path for shared children as a precaution 2012-09-08 23:42:24 -04:00
Michael Gapczynski fe7f095b08 Insert id for unique user group share rows 2012-09-08 23:09:58 -04:00
Michael Gapczynski b163bd514f Fix fetching shared children items, fixes problem with displaying owner of a shared file inside a shared folder 2012-09-08 23:09:57 -04:00
Michael Gapczynski f23f719d99 Fix unsharing from self for group shares and add test for it 2012-09-08 20:15:47 -04:00
Michael Gapczynski 73d726d1b2 Support for unshare from self, with a bunch of temporary fixes to overcome configuration problems with file actions 2012-09-07 00:02:22 -04:00
Michael Gapczynski 4c065deb55 Listen to post_deleteGroup hook in Share API 2012-09-02 20:01:09 -04:00
Michael Gapczynski dc569ea300 Fix some warnings from Jenkins in the Share API 2012-09-02 19:30:01 -04:00
Michael Gapczynski db37a454b3 Add parameter documentation 2012-09-02 18:29:55 -04:00
Michael Gapczynski f0f2d93908 Restructure generateTarget for the post_addToGroup hook 2012-09-02 18:23:19 -04:00
Michael Gapczynski a77c16371f Make item targets be based off of the parent item target for reshares 2012-09-02 18:23:19 -04:00
Michael Gapczynski 6c29334b48 Add support for share expiration 2012-09-01 18:53:48 -04:00
Bart Visscher 0365f8fd01 Remove php close at end of file 2012-08-29 20:29:43 +02:00
Michael Gapczynski 26501a0bc8 Delete old link if user sets a password 2012-08-29 14:06:55 -04:00
Michael Gapczynski 9cd55508c3 Add Share API settings to admin page 2012-08-27 20:39:31 -04:00
Michael Gapczynski 0ad16e84c5 Fix share collection query 2012-08-27 20:37:38 -04:00
Michael Gapczynski 0a9d1ed3a6 Initial previewer for public links 2012-08-27 20:37:38 -04:00
Michael Gapczynski 18517f6adb Fix share getItems() limit 2012-08-26 21:34:37 -04:00
jfd 9822cd30c0 fix sharing bug introduced with oracle support 2012-08-26 14:57:33 +02:00
Jörn Friedrich Dreyer fa3497f6ed add backticks to SQL, use limit parameter instead of LIMIT SQL 2012-08-25 01:52:27 +02:00
Michael Gapczynski 36487246ed Switch to using file cache ids instead of paths for file sharing 2012-08-24 10:05:37 -04:00
Thomas Tanghus c90c358f0d Only load js and css once. 2012-08-23 05:02:30 +02:00
Michael Gapczynski 3debb67458 Move share CSS to core, add script and style from inside Share API 2012-08-22 11:57:58 -04:00
Michael Gapczynski 9699ff03bd Revert using item name, no longer allowing the same item source exist for a user 2012-08-22 11:57:58 -04:00
Michael Gapczynski 09e851a9c4 Fix share ajax calls to use itemName/itemSource, show who shared a file with you 2012-08-20 21:22:22 -04:00
Michael Gapczynski 5eca531f99 Refactor again so we can tell what item is being reshared in case the same source shows up. This is the end of the share_api branch, moving to master. 2012-08-19 22:14:38 -04:00
Michael Gapczynski f987e22d85 Large refactoring to allow for the same item to be shared to a group and again with a user in the group with different permissions 2012-08-19 16:30:38 -04:00
Michael Gapczynski df8a2e5361 File sharing cleanup, works perfectly I think :) 2012-08-16 12:20:14 -04:00
Michael Gapczynski 9cb3113f42 Fix problems exposed by tests 2012-08-15 11:59:08 -04:00
Michael Gapczynski ddfa760a5e Change to correct function call getItemSharedWithBySource() 2012-08-14 17:06:41 -04:00
Michael Gapczynski b440dfc67e Remove setTarget() function, changing target names only leads to confusion 2012-08-14 17:05:38 -04:00
Michael Gapczynski 9661a63a72 Ensure permissions can't be escalated during a reshare 2012-08-14 16:54:38 -04:00
Michael Gapczynski 028c79fc9d Use if instead of switch for detecting share type and throw exceptions when setting permissions 2012-08-14 16:30:13 -04:00
Michael Gapczynski 937d1b29d8 Retrieve all file dependent items when looking for file item type 2012-08-14 11:02:29 -04:00
Michael Gapczynski 64ef1e2181 Change name of share function to shareItem, silly PHP 5.3.1 thinking it is a constructor... 2012-08-12 14:49:41 -04:00
Michael Gapczynski b830b3e24b Start adding permission checks for addressbooks 2012-08-08 21:43:02 -04:00
Michael Gapczynski 2c5744f16c Add back getItemSharedWithBySource(), some situtations require this ability 2012-08-08 20:56:55 -04:00
Bart Visscher b287b11ff2 adjust the query generation in getItems, to use placeholders 2012-08-07 21:49:31 +02:00
Michael Gapczynski b6bbbb4c47 Remove undefined return variable 2012-08-07 14:38:02 -04:00
Michael Gapczynski a96a75c263 Select the correct column when searching for similar targets 2012-08-06 16:48:20 -04:00
Michael Gapczynski 5e95e2a131 Set filePath variable 2012-08-06 16:46:44 -04:00
Michael Gapczynski 1b21cde2b3 Throw more exceptions 2012-08-06 16:37:51 -04:00
Michael Gapczynski 14d13a740f Load icons for addressbooks, fix statuses for types other than files 2012-08-06 15:24:08 -04:00
Michael Gapczynski e954de6030 Make the file source path relative earlier 2012-08-06 14:15:37 -04:00
Michael Gapczynski e280e3ecc9 Throw more exceptions 2012-08-06 14:09:58 -04:00
Michael Gapczynski 1db1d40414 Add additional check for post_deleteUser so we don't delete any non-user shares with the same name 2012-08-06 13:58:26 -04:00
Michael Gapczynski 3b2c853916 Lots of refactoring to share API 2012-08-06 11:27:13 -04:00
Michael Gapczynski 09bb3bfaf8 Preparing for proper collection implementation 2012-08-03 15:05:45 -04:00
Michael Gapczynski 6c7baacf89 Throw exception for items already shared in a collection 2012-08-01 20:08:18 -04:00
Michael Gapczynski 92d683587a Fix contact email share type redirection 2012-08-01 17:52:59 -04:00
Michael Gapczynski 4933128850 Throw exceptions in share API for UI to display 2012-08-01 17:52:29 -04:00
Michael Gapczynski 2201074e1f Basic setup for sharing with contacts 2012-08-01 17:17:28 -04:00
Michael Gapczynski b6aa5d2875 Include contacts in share with search 2012-07-31 21:05:00 -04:00
Michael Gapczynski 9e4c3b8342 Remove break, it broke the statuses :) 2012-07-31 14:21:46 -04:00
Michael Gapczynski 1ff2dd8f63 Listen to post_deleteUser, post_addToGroup, and post_removeFromGroup hooks 2012-07-14 14:06:57 -04:00
Michael Gapczynski cc6c940b9a Implement post_removeFromGroup() 2012-07-14 11:55:22 -04:00
Michael Gapczynski 82dea705d4 Add option to delete() to check the owner of the first search of reshares 2012-07-14 11:53:02 -04:00
Michael Gapczynski 0e9ab5cf2a Fix post_deleteUser(), column name changed and item_source is no longer needed 2012-07-14 11:02:16 -04:00
Michael Gapczynski 459bcd8d5e Update documentation 2012-07-14 10:55:34 -04:00
Michael Gapczynski bbbfc2c565 Fix delete(), it was going in an infinite loop 2012-07-14 10:52:31 -04:00
Michael Gapczynski 8de69fcb18 Update documentation 2012-07-14 10:19:18 -04:00
Michael Gapczynski 51a4518396 Add support for CRUDS permissions 2012-07-14 09:35:39 -04:00
Michael Gapczynski f638340d1f Add check for folder item type as well 2012-07-12 14:29:51 -04:00
Michael Gapczynski 63b6f20e05 Move already shared with check out of user and group cases, and add check for already shared with inside a collection 2012-07-12 12:11:04 -04:00
Michael Gapczynski ecae3ea430 Rename parents to collectionTypes, getCollectionItemTypes() shouldn't include the original item type 2012-07-12 12:10:50 -04:00
Michael Gapczynski bdcfa4bb63 Add check if file is found in file cache 2012-07-11 20:43:48 -04:00
Michael Gapczynski ccb5e99395 Generate random token for private links (more entropy than past private links) 2012-07-11 12:18:59 -04:00
Michael Gapczynski a7416b1cd8 Add back returning only the item if the limit is 1 and now check that the format is set to none 2012-07-10 21:30:16 -04:00
Michael Gapczynski c21ff29a53 Fix getItems() calls 2012-07-10 21:29:34 -04:00
Michael Gapczynski 7c908a0016 Sharing files working using share API 2012-07-10 18:56:22 -04:00
Michael Gapczynski 96dea9507a Return false for single item checks and an empty array for multiple item checks 2012-07-03 14:03:04 -04:00
Michael Gapczynski 5e8ef33190 Clean up in the dropdown for unsharing 2012-07-03 14:00:09 -04:00
Michael Gapczynski 4185bd6292 Load shared addressbooks inside OC_Contacts_Addressbook instead of the index, add public functions getItemShared(With)BySource() for contacts app 2012-07-03 11:11:01 -04:00
Michael Gapczynski 77b582e4e6 Change getItems() return to a 3-dimensional array to handle multiple shares of the same item 2012-07-02 15:29:34 -04:00
Michael Gapczynski dd56416a39 Remove the method getItemsSharedStatuses, it is easy enough to just pass the format instead 2012-07-02 14:23:13 -04:00
Michael Gapczynski 3e8a34f906 Don't select all columns for FORMAT_STATUSES 2012-06-30 21:15:10 -04:00
Michael Gapczynski c073216d8d Don't overwrite the item variable when checking if the item is already shared 2012-06-30 20:57:31 -04:00
Michael Gapczynski 75c111a33b Have getItems() return an empty array instead of false, so apps only need to do an array_merge() 2012-06-30 18:00:01 -04:00
Michael Gapczynski 7a649fc65a Switch back to registering just the class and not the object, better for performance 2012-06-30 17:25:21 -04:00
Michael Gapczynski cb19fdd55b Show users and groups shared with in dropdown 2012-06-27 01:05:37 +02:00
Michael Gapczynski d95d738723 Fix FORMAT_STATUSES 2012-06-27 01:05:36 +02:00
Michael Gapczynski 9fdfcc29fe Fix group sharing 2012-06-27 01:05:36 +02:00
Bart Visscher d332e1e9c1 Documentation fix 2012-06-27 01:05:36 +02:00
Michael Gapczynski c41cb192c9 Fix which line needs '' wrapped around the array values 2012-06-27 01:05:36 +02:00
Michael Gapczynski 243faf6334 Fix searching for parent item types, search for file source instead of item source for the file item type in case the item was converted 2012-06-27 01:05:36 +02:00
Michael Gapczynski 32f9901bcd Fix retrieving supported file extensions from backend and remove the dependsOn and supportedFileExtensions parameters from registerBackend() 2012-06-27 01:05:36 +02:00
Michael Gapczynski 28b7793d5b Fixes and change database table from sharing to share 2012-06-27 01:05:36 +02:00
Michael Gapczynski f21fdf14f9 Forgot I got rid of the class field backendTypes, use the array keys of the backends field instead 2012-06-27 01:05:36 +02:00
Michael Gapczynski bc68f14c4b Prepare drop down UI for share API 2012-06-27 01:05:36 +02:00
Michael Gapczynski 8198114615 Some more changes to getItems() and fixes in shared storage 2012-06-27 01:05:36 +02:00
Michael Gapczynski 5f1aa1b92e Fix additional getItems calls due to parameter change 2012-06-27 01:05:36 +02:00
Michael Gapczynski 71350bc618 I'm having trouble making up my mind... translateItem -> getItems() -> formatItems(). It may change again. Preparing shared storage for new api. 2012-06-27 01:05:36 +02:00
Michael Gapczynski 10986f00dc Use share type and share with in db instead of separate columns for user and group 2012-06-27 01:05:36 +02:00
Michael Gapczynski bd8769a7c5 Fixes for registering and fetching backends 2012-06-27 01:05:36 +02:00
Michael Gapczynski c7e0449a75 Finish parent folder implementation, change recursive delete process 2012-06-27 01:05:36 +02:00
Michael Gapczynski 0cc7ae904d Initial work on a share API 2012-06-27 01:05:36 +02:00