Commit graph

487 commits

Author SHA1 Message Date
Robin McCorkell
9d0915013b Merge pull request #13352 from owncloud/hhvm-array-key
HHVM: Do not use key() on array as the result depends on the internal array pointer.
2015-01-15 01:06:45 +00:00
Andreas Fischer
b4a52e889a Do not use key() on array as the result depends on the internal array pointer. 2015-01-15 00:48:10 +01:00
Vincent Petry
a9f0582e3e Use source storage permissions when scanning shared storage 2015-01-14 18:11:23 +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
Vincent Petry
01c83158bb Fix source path when share is a mount point
Whenever an external storage mount point is shared directly, its path is
empty which causes a leading slash to appear in the source path.

This fix removes the bogus leading slash in such situation.
2015-01-08 11:46:11 +01:00
Joas Schilling
70dcebbf92 Correctly return false when translating a foreign activity 2015-01-07 15:02:25 +01:00
Bjoern Schiessle
8c48be453e only send activity if we have a valid path and the file is readable 2014-12-23 13:32:54 +01:00
Robin Appelman
3afcc71764 Make sure the path passed to the activity manager is normalized 2014-12-22 18:50:00 +01:00
Bjoern Schiessle
393deb5961 add activity if public shared file/folder was downloaded 2014-12-22 18:50:00 +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
Jörn Friedrich Dreyer
49318b4d93 Merge pull request #12896 from owncloud/drop-deprecated
first step to drop \OCP\Config:: in favour of IConfig
2014-12-18 23:01:49 +01:00
Vincent Petry
11b3aa2dbe Fix issues with searchByTag in shared storage 2014-12-18 17:27:56 +01:00
Robin Appelman
e656af4c83 Root always exists 2014-12-17 16:09:41 +01:00
Morris Jobke
d41082f4d6 first step to drop \OCP\Config:: in favour of IConfig 2014-12-17 11:12:37 +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
Joas Schilling
46def69574 Specify list of activity parameters for sharing extension 2014-12-12 11:41:01 +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
25dde7e93b Added searchByTags to view, storage and cache 2014-12-11 17:38:50 +01:00
Morris Jobke
3026cdbc80 Merge pull request #12549 from owncloud/shared-cache-non-existing
Dont return cached date in shared cache when the file doesn't exist
2014-12-10 08:49:40 +01:00
Lukas Reschke
25a87d4058 Merge pull request #12577 from owncloud/public-mount-api
Add a public api for apps to add mounts
2014-12-08 22:57:33 +01:00
Robin Appelman
f4701d7721 Add public api for mount configurations 2014-12-04 16:47:27 +01:00
Bjoern Schiessle
698ecbf308 OCS API for server-to-server sharing 2014-12-04 13:18:13 +01:00
Robin Appelman
ce10b93519 Dont return cached date in shared cache when the file doesn't exist 2014-12-02 15:28:11 +01:00
Morris Jobke
c5fa8f1bdc Merge pull request #12421 from owncloud/issue/6101-remove-namespace-permission-constants
Issue/6101 remove namespace permission constants
2014-11-26 08:31:23 +01:00
Thomas Müller
e6a7022037 Merge pull request #12410 from owncloud/no_session_for_public_share_key
don't store private public-share-key in session
2014-11-25 22:26:40 +01:00
Joas Schilling
2c39aec8cb Replace deprecated constant with new class constant 2014-11-25 16:30:21 +01:00
Bjoern Schiessle
1d33503487 we no longer need to keep the session open for encryption 2014-11-25 13:37:11 +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
Lukas Reschke
8589079590 Close session only if encryption app is not enabled
Fixes https://github.com/owncloud/core/issues/12389
2014-11-24 15:02:49 +01:00
Bjoern Schiessle
a7ebfe87c9 also check for the correct owner if it was submitted 2014-11-21 16:17:37 +01:00
Thomas Müller
cbb9caf030 Merge pull request #12226 from owncloud/remove-phpass
Remove phpass and migrate to new Hasher interface
2014-11-20 14:59:59 +01:00
Lukas Reschke
a6ebb17610 Remove unused variable and make Scrutinizer happy. 2014-11-18 18:52:00 +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
Lukas Reschke
1b85f40cbe $file only contains the filename and not the absolute path, that means that files in a subdirectory will not get properly resolved and an empty filesize is returned.
This feature only exists on master.
2014-11-18 17:14:26 +01:00
Lukas Reschke
8595b76df2 Remove phpass and migrate to new Hasher interface
This PR removes phpass and migrates to the new Hasher interface.

Please notice that due to https://github.com/owncloud/core/issues/10671 old hashes are not updated but the hashes are backwards compatible so this shouldn't hurt.
Once the sharing classes have a possibility to update the passwords of single shares those methods should be used within the newHash if block.
2014-11-17 13:39:13 +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
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
Vincent Petry
ee6d8c9d58 Store curl error message directly 2014-11-04 17:37:15 +01:00
Vincent Petry
768f3979e0 Check for cert bundle existence before using it 2014-11-04 16:44:42 +01:00
Vincent Petry
106b9eb55c Merge pull request #11409 from owncloud/watcher-reuse
Pass the cached data to the filesystem watcher
2014-10-29 16:38:16 +01:00
Vincent Petry
f44e617dfd Fix warning with unset extension check 2014-10-29 12:56:49 +01:00
Robin Appelman
4438c7de1d Fix shared cache getFolderContents 2014-10-24 12:32:55 +02:00
Robin Appelman
6ed9f53fcd also update shared watcher 2014-10-24 12:32:55 +02:00
Bjoern Schiessle
527e1d001f try to get path from filesystem 2014-10-10 14:47:41 +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
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
d5fc011c90 some small fixes 2014-09-25 11:29:57 +02:00
Bjoern Schiessle
89c3b650e6 group shares and combine permissions 2014-09-22 17:25:15 +02:00
Robin Appelman
298011bf29 fix indention 2014-08-31 10:45:11 +02:00
Robin Appelman
c2ebc192a6 Make external shares work with imported self-signed certificates 2014-08-31 10:45:11 +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
Clark Tomlinson
58ab105515 Merge pull request #10421 from owncloud/share-external-delete
Remove no longer existing files from the cache when scanning external storage
2014-08-25 11:28:50 -04:00
Morris Jobke
b3b3354809 move to public namespace 2014-08-19 14:05:08 +02:00
Stephan Peijnik
2df52e54d7 Fix STORAGE_* constants usage by moving those constants into \OC\Files\Filesystem.
As constants not defined within a class cannot be automatically found by the
autoloader moving those constants into a class makes them accessible to
code which uses them.

Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>
2014-08-19 13:55:35 +02:00
Bjoern Schiessle
c9903f2e68 make share folder configurable 2014-08-18 16:52:48 +02:00
Robin Appelman
bbe17f35a1 Remove no longer existing files from the cache when scanning external storage 2014-08-14 14:50:52 +02:00
Robin Appelman
bba59bf815 Cast file id's to int so we can compare them properly 2014-08-13 19:18:34 +02:00
Robin Appelman
f1091280de Merge pull request #10184 from owncloud/getbyid-node
Fix Folder::getById
2014-08-07 13:40:17 +02:00
Robin Appelman
eb8683e6ee trim leading slash 2014-08-06 14:57:54 +02:00
Robin Appelman
12207ec0c7 Fix SharedCache::getPathById 2014-08-06 13:38:14 +02:00
Bjoern Schiessle
f451173817 remove unused variable 2014-08-05 20:34:18 +02:00
Jörn Friedrich Dreyer
a7b4cd77b1 traverse folders in php to search in shared files 2014-07-31 12:05:29 +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
b7958f79c3 adjust error code 2014-07-28 12:39:22 +02:00
Bjoern Schiessle
ecc1f92bb6 add OCS api call to set expire date for link shares 2014-07-25 13:38:18 +02:00
Robin Appelman
97de7bb23e Fix remote share when remote server is installed at the root 2014-07-23 13:45:56 +02:00
Vincent Petry
658828867c Correctly return the owner display name for children of shares 2014-07-16 12:07:02 +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
Björn Schießle
a544bd3a0f Merge pull request #9357 from owncloud/sharing_unshare_on_delete
[sharing] unshare childrens on delete
2014-07-04 17:42:52 +02:00
Vincent Petry
5e8959a5b3 Return and use isPreviewAvailable for share previews
Since the mime type is known, now isPreviewAvailable is returned as well
and used by the JS side to properly render mime icon and previews.
2014-07-04 11:16: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
ed29e7d160 Merge pull request #9329 from owncloud/sharing_check_target
don't move a share mount point into a different mount point
2014-07-02 21:01:03 +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
edb67f9f4d Remove invalid mounts from the active fs 2014-07-02 15:00:12 +02:00
Bjoern Schiessle
bb935978fa don't move a share mount point into a different mount point 2014-07-01 19:38:55 +02:00
Robin Appelman
8061a4ccc0 Remove external shares if the share is invalid 2014-07-01 14:58:07 +02:00
Robin Appelman
1c43081d38 Detect removed public shares 2014-07-01 14:36:06 +02:00
Jörn Friedrich Dreyer
abc521dbf7 add missing backticks 2014-07-01 12:29:30 +02:00
Bjoern Schiessle
372d58544f no longer check if the external storage app is enabled, we use no the webdav implementation from core 2014-06-30 12:34:49 +02:00
Robin Appelman
1bb1504d24 Improve comment 2014-06-27 17:31:51 +02:00
Robin Appelman
6f5d5b9a30 Also check for updated permissions for webdav storages 2014-06-27 17:27:47 +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
84d36df70b make sure that we always return the correct permissions 2014-06-24 13:39:37 +02:00
Vincent Petry
9b001ed903 Setup the external share manager in a hook
To make sure the external shares are initialized in the right order and
make sure the session is correctly initialized before, the external
share manager is now set up in a filesystem setup hook.
2014-06-23 11:57:43 +02:00
Robin Appelman
3ed4e5b26b Prevent warning 2014-06-16 16:12:32 +02:00
Robin Appelman
9c2918a626 Fix setupFromToken when a password is set 2014-06-16 16:09:56 +02:00
Robin Appelman
0616eb4007 Fix multiple users having the same external share mountpoint 2014-06-16 15:57:01 +02:00
Robin Appelman
9670d3e98b Always send a POST body 2014-06-14 10:22:38 +02:00
Robin Appelman
455fbafb48 Fix undefined index error 2014-06-14 10:22:38 +02:00
Bjoern Schiessle
3bf7b54cd5 block server-to-server share if files_external is not activates, can be reverted once we moved to the webdav implementation in core 2014-06-14 10:22:38 +02:00
Bjoern Schiessle
84a651e46d add settings to disable server to server sharing 2014-06-14 10:22:38 +02:00
Robin Appelman
e7b58ed2bd Properly expose read only public shares as read only 2014-06-14 10:14:08 +02:00
Robin Appelman
87e311b996 Fix storage being passed to cache/watcher and scanner when using storage wrappers 2014-06-14 10:14:08 +02:00
Robin Appelman
decb51aee6 Fix deleting of external shares 2014-06-14 10:14:08 +02:00
Robin Appelman
c8c8106168 generate better storage ids 2014-06-14 10:14:08 +02:00
Robin Appelman
ce0aa7d4a8 Use the movable mount system for external shares 2014-06-14 10:14:08 +02:00
Robin Appelman
c61f759a8b Fix check for shared files inside shares 2014-06-14 10:14:08 +02:00
Robin Appelman
64ced76beb Save mountpoints relative to the user 2014-06-14 10:14:07 +02:00
Bjoern Schiessle
961317d911 make sure to enable incognito mode when mounting a public link and update init status of the encryption app 2014-06-14 10:14:07 +02:00
Robin Appelman
87b0021e56 Scan the entire remote share at once by requesting the full file tree from the remote server 2014-06-14 10:14:07 +02:00
Robin Appelman
a900c7aa94 Fix removing remote shares 2014-06-14 10:13:24 +02:00
Robin Appelman
d7de35376d Add interface for accpeting external shares 2014-06-14 10:13:23 +02:00
Robin Appelman
0156ef8166 Add coments to database and dont use sql keywords as table names 2014-06-14 10:10:38 +02:00
Robin Appelman
a44baaf8eb add remote/add external shares to manager 2014-06-14 10:10:37 +02:00
Robin Appelman
65f3b2fad2 Add server<->server sharing backend 2014-06-14 10:10:37 +02:00
Jörn Friedrich Dreyer
42bf466fa1 move mail template editor from core to standalone templateeditor repo 2014-06-13 12:00:23 +02:00
Robin Appelman
a978607011 Use &= 2014-06-09 12:47:00 +02:00
Bjoern Schiessle
0b2ae314c7 check if permissions exists 2014-06-06 09:56:02 +02:00
Robin Appelman
60ea4388ed Limit permissions to share permissions 2014-06-06 09:56:02 +02:00
Bjoern Schiessle
86d7371d0c fix unshareFromSelf() 2014-06-06 09:56:02 +02:00
Bjoern Schiessle
574de2d91b the mount point always have delete permissions to allow unmount 2014-06-06 09:56:01 +02:00
Bjoern Schiessle
ad5d8d7980 nake sure ti create new db entry when user renames a group share 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
9a48e87253 make sure that we have a path relative to data/user/files to work with 2014-06-06 09:56:00 +02:00
Bjoern Schiessle
0ce07bb6c4 update mount point if file_target changed 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
24f3f6823e get unique_name value directly from the share array 2014-06-06 09:56:00 +02:00
Bjoern Schiessle
5132ae5e69 fix mount point move up if the parent no longer exists 2014-06-06 09:56:00 +02:00
Bjoern Schiessle
884b9a0ecf bring back updateFileTarget() got lost during last rebase 2014-06-06 09:56:00 +02:00
Bjoern Schiessle
1b0b977678 remove share mount 2014-06-06 09:55:59 +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
Robin Appelman
14ce44acc8 Move shared mount moving from the storage to the mount 2014-06-06 09:55:59 +02:00
icewind1991
09cc7c2d44 Merge pull request #8862 from owncloud/share-overview-fixmimetype
Fix mime type returning for shared with others files
2014-06-05 10:29:03 +02:00
Thomas Müller
ff3ded6cb2 Merge pull request #8852 from owncloud/kill-permissions-master
Kill permissions table
2014-06-05 10:05:05 +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
Thomas Müller
c044ff99ce Merge pull request #8724 from owncloud/update-sabre-2.0
Update SabreDAV to 1.8.10
2014-06-04 23:05:34 +02:00
Morris Jobke
7a20d22daa Merge pull request #8824 from owncloud/mail_template_editing_in_webui
minimal mail template editor for administrators
2014-06-04 18:44:44 +02:00
Thomas Müller
fc1d6f4c3c fixes during test 2014-06-04 15:01:36 +02:00
Thomas Müller
76e04027bc Upgrade SabreDAV to 1.8.10
Updating SabreDAV namespaces
2014-06-04 12:22:23 +02:00
Vincent Petry
c88509902e Fix mime type returning for "shared with others" files
Use "path" instead of "file_target", as the latter is not always set /
reliable.
2014-06-04 11:26:03 +02:00
Jörn Friedrich Dreyer
b5a145b297 convert mail template editor to app framework for a restful api 2014-06-03 16:53:03 +02:00
Bjoern Schiessle
916f859377 check if it is a share storage 2014-06-02 20:39:20 +02:00
Thomas Müller
2a10e78c58 no need to empty array in a special way 2014-06-02 20:17:40 +02:00
Bjoern Schiessle
e0a5f3b570 get permissions directly from share storage to avoid additional db calls 2014-06-02 20:17:40 +02:00
Jörn Friedrich Dreyer
37afab87b5 minimal mail template editor for administrators, refs #7177 2014-06-02 19:22:58 +02:00
icewind1991
2ba5701b1a Merge pull request #8778 from owncloud/storage-instanceof
Add storage->instanceOfStorage() to handle instanceof with storage wrappers
2014-05-30 14:58:59 +02:00
Vincent Petry
7fac2b62e9 Fixed warning when file_target is not set
In some cases (like in the unit tests) "file_target" is not set yet
whenever the target file system hasn't been mounted yet.
2014-05-30 12:35:04 +02:00
Vincent Petry
0879a63320 Mimetype for sharing overview 2014-05-30 10:06:29 +02:00
Bjoern Schiessle
dbbb6c5945 extend OCS Share API to allow the user to ask for files shared with him 2014-05-30 10:06:28 +02:00