Commit Graph

735 Commits

Author SHA1 Message Date
Roeland Jago Douma 260892eb3b
Disable link shares of disabled users
Fixes #10869

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-02-07 07:47:38 +01:00
Roeland Jago Douma fc77f530d7
Don't show link shares hash in inherited share list
This adds no value at all. Just showing the text "(Shared link)" now.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-15 09:21:53 +01:00
Roeland Jago Douma 1672ff3bef
Do not use $_GET
The appframework is more than capable of handling this properly.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-05 20:13:11 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Maxence Lange f2c7ca4584
fixing tests + avoid duplicate in getFormattedShares()
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2019-12-03 08:13:22 +01:00
John Molakvoæ (skjnldsv) 5cb11ca642
Fix tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-12-02 13:08:43 +01:00
Roeland Jago Douma 3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +01:00
Roeland Jago Douma 8d4346d656
Fix more tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:42 +01:00
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +01:00
Roeland Jago Douma 77d136cbdf
Apply share permission mask to all files obtained via shareinfo
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-26 11:07:01 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Roeland Jago Douma e9c972f708
Fix share tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-20 08:08:02 +01:00
John Molakvoæ (skjnldsv) 5d2c89ca6c
Fix sharing breadcrumbs
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-11-06 00:53:59 +01:00
John Molakvoæ (skjnldsv) 2fd057513a Fix current user edit/delete permissions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-29 13:20:08 +01:00
John Molakvoæ (skjnldsv) a48359ac02 Adjust unit tests to new OCA.Sidebar
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-29 13:20:08 +01:00
Roeland Jago Douma 7904ddd06a
Merge pull request #17693 from nextcloud/enh/unused-test-dependency
Remove unused import Punic\Data
2019-10-26 20:31:34 +02:00
Daniel Kesselberg a20546bb5c
Remove unused import Punic\Data
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-10-26 16:39:05 +02:00
Daniel Calviño Sánchez 8098abee60 Do not return shares with the current user
Getting the shares of a file no longer returns shares with the current
user for consistency with the results when getting the shares including
subfiles.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-25 21:40:50 +02:00
Daniel Calviño Sánchez 222e5a9a9f Add missing share types when getting shares of a file
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-25 21:39:49 +02:00
Daniel Calviño Sánchez 24febe1e41 Unify share type sorting when getting shares of a file or with subfiles
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-25 21:39:49 +02:00
Daniel Calviño Sánchez 0599536c82 Remove unneeded calls to "ShareManager::shareProviderExists()"
"ShareManager::getSharesBy()" already checks if the share provider
exists before returning the shares and, if the provider does not exist,
it returns an empty array. Therefore it is not needed to explicitly
check if the provider exists or not.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-25 21:39:49 +02:00
Daniel Calviño Sánchez 52870fd1d2 Add unit tests for getting shares of a file
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-25 21:39:45 +02:00
Daniel Calviño Sánchez 9039dd89ef Add unit tests for getting shares including subfiles
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-25 21:27:30 +02:00
Daniel Calviño Sánchez 5c7c308220 Include the share in the Files_Sharing::loadAdditionalScripts event
This provides a better context for apps using the event, for example to
load one script or another depending on whether the share is a file or a
folder.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-17 18:22:54 +02:00
Julius Härtl 5e4eda1ae0
Remove deprecated legacy file actions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-10-14 19:19:16 +02:00
John Molakvoæ (skjnldsv) ff895abac0
Fix shares read permissions
A user with reshare permissions on a file is now able to get any share
of that file (just like the owner).

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-04 21:40:30 +02:00
John Molakvoæ (skjnldsv) b1069b29fa
Add checks for whether a user with access to a share can delete it
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-04 19:25:11 +02:00
Joas Schilling 858b18e34a
Bye Spreed namespace, hello Talk!
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-09-05 15:32:58 +02:00
Roeland Jago Douma 0487144b26
Remove deprecated searchByTag
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-07-26 12:29:19 +02:00
Joas Schilling 87836472d3
Remove duplicate tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-03 16:34:14 +02:00
Joas Schilling 85a80b05ac
Unify the permission checking in one place only
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-03 16:34:00 +02:00
Roeland Jago Douma f9f3e00d06
Fix sharing tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-06-27 15:27:31 +02:00
Christoph Wurst 249a5dbdba
Move oc_webroot, OC.webroot and OC.getRootPath() to the bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-05-06 17:55:30 +02:00
Roeland Jago Douma 7c264cb7fa
Harden public preview tests
This way there are less timing issues.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-04-16 16:50:44 +02:00
John Molakvoæ (skjnldsv) ff164db935
Add link icon for public link too
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-03-21 08:16:00 +01:00
Christoph Wurst e930a0ccbe
Search sharees on lookup server when explicitly requested by user
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-02-26 19:44:49 +01:00
Christoph Wurst f3023aaa85
Show sharing recommendations
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-02-25 07:25:21 +01:00
Julius Härtl e5445ccbba
Call proper function when fetching link shares in the breadcrumb view
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-01-22 15:56:42 +01:00
Julius Härtl 3828283c01
Add caching headers for public previews
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-01-02 22:27:46 +01:00
Joas Schilling ee545d6840
Fix typo in "incoming"
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-12-05 11:27:38 +01:00
John Molakvoæ (skjnldsv) 1deda8fd65
Rollback to default list view
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-15 20:29:10 +01:00
Morris Jobke 7940a79a41
Merge pull request #12324 from nextcloud/add-password-response-parameter-for-returning-the-password-of-link-shares
Add "password" parameter to the response data of link shares
2018-11-07 16:29:05 +01:00
Morris Jobke 463dfb50d9
Fix unit tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-07 10:25:36 +01:00
Michael Weimann c572c669e5
Adapts the code to the new master state
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-11-07 10:19:20 +01:00
Michael Weimann 16f379b974
Hides the header actions for file drops
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2018-11-07 10:19:19 +01:00
Daniel Calviño Sánchez b2cc2d6023 Add "password" parameter to the response data of link shares
Due to legacy reasons the password of link shares was returned in the
"share_with" and "share_with_displayname" parameters of the response
data. Now a proper "password" parameter is returned too; the old
"share_with" and "share_with_displayname" parameters are kept, although
deprecated, and they will be removed in a future version of Nextcloud.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-06 23:48:28 +01:00
John Molakvoæ (skjnldsv) cac2f7f4d6
Fix tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-06 16:05:34 +01:00
Daniel Calviño Sánchez adf80aa8b3 Add sending the password by Talk for a link share to ShareAPIController
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-02 01:57:48 +01:00
Daniel Calviño Sánchez 52cada951b Check "note", "label" and "hide download" too in update share tests
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-02 01:56:07 +01:00
Bjoern Schiessle feb9f72e8b adjust unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-11-01 04:27:25 +01:00