Commit Graph

278 Commits

Author SHA1 Message Date
Lukas Reschke c30b7f8197 Remove unreachable statement 2014-10-23 23:03:14 +02:00
Bjoern Schiessle b7718bc212 always use the correct share type 2014-10-22 11:48:29 +02:00
Bernhard Reiter 7e9baafc53 Add option to include tags for shared items. 2014-10-14 00:06:07 +02:00
Bjoern Schiessle c6c9a51b11 distinguish between file dependent shares and other shares 2014-10-13 15:04:54 +02:00
Bjoern Schiessle 3431d547a9 fix performance issues 2014-10-10 12:16:26 +02:00
Bjoern Schiessle 6e7acb8ae0 some small fixed, suggested by scrutinizer 2014-09-29 11:23:18 +02:00
Bjoern Schiessle 2a4da7fe09 on unshare only unshare childrens if there is no other parent available 2014-09-26 16:58:47 +02:00
Bjoern Schiessle e115a7043f only create a new share entry, if the user needs a different target name than the group share 2014-09-26 13:19:15 +02:00
Bjoern Schiessle ed85055d31 for group shares we don't need a extra db entry of groupTarget equals itemTarget 2014-09-26 13:10:31 +02:00
Bjoern Schiessle d242e518f9 for group shares only the parent has the up-to-date permission. Make sure that we always use this permission, except if the user permission is '0' because in this case the user unshared the group share from self 2014-09-26 13:01:54 +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 968152113e always select permissions, used in getItems() 2014-09-25 12:35:11 +02:00
Bjoern Schiessle d5fc011c90 some small fixes 2014-09-25 11:29:57 +02:00
Bjoern Schiessle 07d43df713 only add a new row if it isn't a unique share, otherwise update the existing row 2014-09-24 14:02:02 +02:00
Bjoern Schiessle 9f7b15582a fix add user to group to work with grouped shares 2014-09-24 14:02:01 +02:00
Bjoern Schiessle bd268c35f5 generateTarget() will always find a unique target 2014-09-24 14:02:01 +02:00
Bjoern Schiessle 9105e17307 unit tests for grouping of shares pointing to the same source 2014-09-22 17:54:47 +02:00
Bjoern Schiessle 89c3b650e6 group shares and combine permissions 2014-09-22 17:25:15 +02:00
VicDeo efd485acda Merge pull request #10858 from owncloud/issue/10847
Use correct language package so the subject is correctly translated
2014-09-09 01:11:34 +03:00
kondou a10411d2bc Readd TOKEN_LENGTH 2014-09-04 19:09:26 +02:00
kondou 226b203e20 Use base62 and remove configuration options for link length 2014-09-04 16:20:20 +02:00
kondou c2d8eabd71 Change config.sample entry and use MediumSecurity 2014-09-04 15:52:23 +02:00
kondou 3bf725d7e0 Adapt token size to new generation and add an option for free length specification
Minimum size is 3 = 46656 tokens, maximum size is 64, which is what our DB allows.
2014-09-04 15:24:33 +02:00
kondou 2a4c51389c Use a route instead of s.php and convert tokens asap 2014-09-04 15:23:55 +02:00
kondou 0f2ad9862e Initial work on shorter links 2014-09-04 15:23:53 +02:00
Joas Schilling a0e8e88bc6 Use correct language package so the subject is correctly translated
Fix #10847
2014-09-04 11:23:23 +02:00
Robin Appelman d0266c0bf8 Use public api for getting l10n 2014-08-31 10:08:22 +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
Bjoern Schiessle d9f35d8c15 we need the recipient as a additional parameter to know for which share the notification was send 2014-08-13 17:02:51 +02:00
Tom Needham aeef10eb47 Add scrollto to the url if sharing a file for long file lists 2014-08-09 00:21:29 +01:00
Tom Needham 16dafa9cac Fix link to files and folders in internal share emails 2014-08-09 00:08:45 +01:00
Volkan Gezer 173538befb typo fix from transifex suggestion 2014-08-06 20:48:26 +02:00
Morris Jobke 9fb79c86f0 Merge pull request #10191 from owncloud/sharing_rm_trailing_slash
[sharing] remove trailing slash
2014-08-05 23:13:35 +02:00
Bjoern Schiessle 48c57b80e3 remove trailing slash from path 2014-08-05 20:34:32 +02:00
Bjoern Schiessle 41cca70a63 don't display share permission if resharing was disabled by the admin 2014-08-05 10:57:51 +02:00
Thomas Müller 65903a012a Merge pull request #10025 from owncloud/l10n-typo
typo fix from transifex suggestion
2014-08-04 11:03:50 +02:00
Volkan Gezer 7a07690b25 expire -> expiration 2014-08-02 04:02:39 +02:00
Volkan Gezer 5f015067f4 suggestions by deepdiver 2014-08-01 01:39:52 +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
Volkan Gezer 90d8f42d7c typo fix from transifex suggestion 2014-07-30 14:07:32 +02:00
Bjoern Schiessle 67e302885c remove share permission if user is excluded from sharing 2014-07-29 10:08:08 +02:00
Bjoern Schiessle 4e87ac2bb9 make sure that we set the expire date if a date is adefault date is set 2014-07-28 22:45:03 +02:00
Michael Kuhn ecdd04374a Allow specifying the item source in unshareFromSelf(). 2014-07-26 02:00:49 +02:00
Bjoern Schiessle ecc1f92bb6 add OCS api call to set expire date for link shares 2014-07-25 13:38:18 +02:00
icewind1991 61b5a770e4 Merge pull request #9561 from libasys/patch-3
Fix Error undefined index: file_target
2014-07-15 16:54:57 +02:00
libasys cd88c2fd7b Update share.php
change isset with empty on line 1911
2014-07-10 13:19:35 +02:00
libasys b395ff549b Update share.php
Added isset for error:
```
Undefined index: file_target at /var/www/owncloud/lib/private/share/share.php#1911
```
2014-07-10 13:02:04 +02:00
Daniel Hansson 851c1f87d6 Fix for #9422 2014-07-09 14:40:05 +02:00
libasys e70a7af6da BugFix missing $item on 'file_target' Line 1911
I think this should be right!
2014-07-08 10:51:05 +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
Robin Appelman c61f759a8b Fix check for shared files inside shares 2014-06-14 10:14:08 +02:00
Robin Appelman 65f3b2fad2 Add server<->server sharing backend 2014-06-14 10:10:37 +02:00
Vincent Petry 65b3d293ce Added ORDER BY to enforce share entry order
Sometimes MySQL decides to return the shares in the wrong order, but
some parts of the code seem to require the order to be known, at least
so that the parent shares come before the children shares.

This fix adds an ORDER BY clause to force the order by id.
2014-06-11 14:28:30 +02:00
Bjoern Schiessle f15d7dfec0 only expire link shares 2014-06-06 15:47:37 +02:00
Bjoern Schiessle 3459f99dd6 make sure that we only delete shares for the current user 2014-06-06 09:56:02 +02:00
Bjoern Schiessle eec1c4398a only unshare user share if it was shared with the current user 2014-06-06 09:56:02 +02:00
Bjoern Schiessle 5bbfdc35d7 make sure that we remove all shares refering to the same parent 2014-06-06 09:56:02 +02:00
Bjoern Schiessle 86d7371d0c fix unshareFromSelf() 2014-06-06 09:56:02 +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
Bjoern Schiessle 6578f00b4b unify share settings 2014-06-05 15:49:34 +02:00
Thomas Müller da3974bcb2 - drop permissions table and related code
- the file/folder's permission is now stored in the file cache
- BackGroundWatcher has been removed - this has meanwhile be replaced by occ files:scan which can be executed in a cron jobs
- increase version to trigger database migration
2014-06-05 08:22:01 +02:00
Bjoern Schiessle 12338e0ef0 allow admin to disable sharing for specific groups of users 2014-05-22 10:43:44 +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
Joas Schilling ab7ae004f7 Automatically copy the share expiration date when new shares are created
Fix #4823
2014-05-19 01:38:47 +02: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 fa503a4772 fix PHPDoc 2014-05-13 19:09:15 +01:00
Thomas Müller 7853bc4cac adding PHPDoc 2014-05-13 19:09:14 +01:00
Thomas Müller 147007bdd8 fixing typo and missing @throws 2014-05-13 19:09:14 +01:00
Robin McCorkell 87b548ed91 Fix all PHPDoc types and variable names, in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell a7ae2e874a Squash 'a | b' into 'a|b', in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell b5bc37d2e4 Fix @return array PHPDocs, in /lib 2014-05-13 19:08:14 +01:00
Vincent Petry 390549c286 Merge pull request #8221 from owncloud/type-hinting-sharing
Type hinting fixes for sharing
2014-05-08 09:30:50 +02:00
Bart Visscher 9f88141bcd Use 'boolean' as type instead of 'bool' 2014-05-07 20:46:08 +02:00
Bart Visscher 72864d1c53 Typo 2014-05-06 18:05:06 +02:00
Bart Visscher 50f49c57b5 Some more params are optional 2014-05-01 18:11:30 +02:00
Bart Visscher 66b1ad0a9b Merge branch 'master' into type-hinting-sharing
Conflicts:
	apps/files_sharing/lib/share/file.php
	apps/files_sharing/tests/api.php
	lib/private/share/share.php
2014-04-28 17:59:41 +02:00
Robin McCorkell 77e3d067f0 Better handle return values from Filesystem::getMountBy*
getMountByStorageId and getMountByNumericId return an empty array on error,
which should be detected to avoid possible errors. This commit also adds in
some new logging points and throws to aid debugging
2014-04-25 09:50:34 +01:00
Björn Schießle f520305848 Merge pull request #8026 from owncloud/remove_shared_folder
remove the "Shared" folder
2014-04-24 18:45:45 +02:00
Bjoern Schiessle 35321c7d41 add additional rows to the select statement, 'stime' is needed for the expire check 2014-04-24 15:18:25 +02:00
Bjoern Schiessle 6650be9913 add setting to set default expire date 2014-04-24 13:34:31 +02:00
Volkan Gezer ff0dab6e92 This adds one more missing untranslated text from lib/share
Also displays the untrusted domain warning in English
2014-04-24 01:42:18 +02:00
Bjoern Schiessle b312d38d38 remove hard-coded shared folder 2014-04-23 12:59:22 +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 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 bffcbac7a7 allow to rename group share mount points 2014-04-23 12:54:25 +02:00
Bjoern Schiessle 4c840cb61d fix target generation for group shares 2014-04-23 12:54:25 +02:00
Bjoern Schiessle ed981294f1 fix share api tests 2014-04-23 12:54:25 +02:00
Bjoern Schiessle c4e0fb75a4 add api to get shares from a specific user 2014-04-23 12:54:24 +02:00
Bjoern Schiessle cfc52ccc3d add some action items 2014-04-23 12:54:24 +02:00
Joas Schilling 704b9e6a0d Merge pull request #8009 from owncloud/feature/add-sharing-target
Add option to getUsersSharingFile() to get the paths for the shared users
2014-04-23 12:49:06 +02:00
Thomas Müller dcc48f9b46 Merge pull request #8068 from wakeup/fix-share.php-string-extraction
Make lib/** share.php strings extractable for translation
2014-04-23 09:58:10 +02:00
Volkan Gezer 6e857de6b7 Make lib/** share.php strings extractable for translation
They were not ready for translation as they had no placeholders
and/nor wrapper function to be translated

This should fix: #8011
2014-04-22 14:56:44 +02:00
Bart Visscher a9bf3df82d Fix PHPdoc in OC\Share\Share and OCP\Share 2014-04-15 21:05:44 +02:00
Björn Schießle 2dbb2db7e0 Merge pull request #7780 from owncloud/share-file-exists
Verify that a file exists before we share it
2014-04-15 11:23:17 +02:00
Joas Schilling 352063cf0a Fix Undefined index: storage in share.php
There parameter was removed when the code was cleaned up:
{"app":"PHP","message":"Undefined index: storage at
E:\\ownCloud\\owncloud\\lib\\private\\share\\share.php#1160",
"level":0,"time":"2014-04-09T12:56:23+00:00"}
2014-04-09 15:14:44 +02:00
Joas Schilling d418e176ce Do not query when the list is empty 2014-04-09 15:02:06 +02:00
Joas Schilling 015b9b1dac Add option to getUsersSharingFile() to get the paths for the shared users 2014-04-09 15:02:05 +02:00
Thomas Müller 20f26068e7 Merge pull request #7476 from owncloud/type-hinting
Type hinting
2014-04-03 20:02:27 +02:00
Robin Appelman 850a0e7388 Verify that a file exists before we share it 2014-04-02 13:47:11 +02:00
Bart Visscher 6b061c236d Merge branch 'master' into type-hinting
Conflicts:
	lib/private/image.php
	lib/private/l10n.php
	lib/private/request.php
	lib/private/share/mailnotifications.php
	lib/private/template/base.php
2014-03-31 21:38:54 +02:00
Bjoern Schiessle 3a731a01b1 select statement always need to contain file_source respectively item_source 2014-03-31 15:03:35 +02:00
Morris Jobke e4069e1553 Emit event after setting a new expiration for a share
all credits to @frisco82
https://github.com/owncloud/core/pull/5335
2014-03-28 15:00:13 +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 2d8607fae9 don't assign variables in if condition 2014-03-25 17:47:24 +01:00
Bjoern Schiessle 5db3b049fd add todo 2014-03-25 17:47:24 +01:00
Bjoern Schiessle bc0292c16d always return an array 2014-03-25 17:47:24 +01:00
Bjoern Schiessle 154277ab11 seperate formatResults() 2014-03-25 17:47:24 +01:00
Bjoern Schiessle ecde48fce8 don't assign variables in if conditions 2014-03-25 17:47:24 +01:00
Bjoern Schiessle 078fafdc5a use variable 2014-03-25 17:47:24 +01:00
Bjoern Schiessle 3a459db358 seperate transformDBResults 2014-03-25 17:47:24 +01:00
Bjoern Schiessle 6607f7cb5e seperate creation of select statement 2014-03-25 17:47:24 +01:00
Bjoern Schiessle 6afd496d9b remove prepFileTarget() seems that it is no longer in use 2014-03-25 17:47:24 +01:00
Bjoern Schiessle b602662578 add a "helper" and a "hooks" class. Move constants needed by multiple classes
to a "constants" class
2014-03-25 17:47:24 +01:00
Bjoern Schiessle 8b6d1d3bf2 added private share api 2014-03-25 17:47:24 +01:00
Thomas Müller f1ecc758f5 send an individual email to each recipient 2014-03-10 21:54:23 +01:00
Bart Visscher 35a8dfb2fa More PHPDoc fixes, using scrutinizer patches as hints 2014-02-28 13:53:41 +01:00
Björn Schießle 16eb43c033 Merge pull request #7247 from owncloud/sharing_cleanup_step1
clean up the sharing ajax calls, add mail notification class
2014-02-20 11:56:20 +01:00
Bjoern Schiessle 2fd75d8f1c clean up the sharing ajax calls, add mail notification class 2014-02-19 19:33: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
Arthur Schiwon af781bdea7 fix DI 2014-02-11 10:50:03 +01:00
Arthur Schiwon 32afdcbefe Inject logger 2014-02-11 10:49:59 +01:00
Arthur Schiwon 20bfbb0fd9 wrong tld 2014-02-11 10:49:54 +01:00
Arthur Schiwon 82716ced48 sort following entries in alphabetical order 2014-02-11 10:49:41 +01:00
Arthur Schiwon 41e8d44cf7 move sorter into a class 2014-02-11 10:49:34 +01:00