Commit Graph

1167 Commits

Author SHA1 Message Date
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 c7d5b8fc49
Merge pull request #18079 from nextcloud/fixes/phpcs
Some php-cs fixes
2019-11-25 14:07:00 +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
waleczny 6e3ea09b1c
Get first element of nodes array
Geting first element of nodes array instead of element with key 0. In some cases key 0 not exists in this array ie. when file is shared from group folder with member of this group who have no permission to read this file.
2019-11-18 23:33:26 +01:00
Roeland Jago Douma e16321368f
Fixes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-18 16:11:03 +01:00
Joas Schilling d3b62893af
Make sure the super share also has a valid type
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:37:47 +01:00
Joas Schilling 6d9afca14f
Fix "Invalid parameter number: mixed named and positional parameters"
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:37:47 +01:00
Joas Schilling 0fe4b717dc
Correctly use the displayname of the sharer in the notification
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:37:47 +01:00
Joas Schilling e79ab7d0c5
The share manager knows which provider can accept shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:37:47 +01:00
Joas Schilling 19e1892d50
Use constants for the magic strings
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:37:45 +01:00
Joas Schilling 43517cfac6
Accept existing shares on update
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:37:00 +01:00
Joas Schilling 60da25681e
Only restrict loading of group and user shares for now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:37:00 +01:00
Joas Schilling 8986910a7d
Add notifications for users that are added to the group
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:37:00 +01:00
Joas Schilling 520042bbd0
Allow to accept group shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:36:58 +01:00
Joas Schilling c79a56481b
Notifications for group shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:33:53 +01:00
Joas Schilling e96c9e0e4a
Add the notifier and the API endpoint for user shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:33:50 +01:00
Joas Schilling dcdbea54e6
Respect the accepted flag for group and user shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:13:38 +01:00
Roeland Jago Douma 1ac57e76fa
Add notification for shares about to expire
Introduces a new command that will create notifications for users if
they have shares that will expire the next day.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-01 08:53:18 +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) cc4362df4f Unify code to get shares of a file or also including subfiles
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-25 21:41:12 +02:00
John Molakvoæ (skjnldsv) dbb6b4cbb9 Filter out duplicated shares before processing them
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-25 21:41:12 +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 1afefc2d9a Extract method to get all shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-10-25 21:39:49 +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 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
Roeland Jago Douma 4a2f9fab66
Move over OCSShareAPIMIddleware to pure DI
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-10-16 22:53:09 +02:00
Joas Schilling 4d40eb61b4
List share download activity under sharing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-10-10 08:43:54 +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
John Molakvoæ (skjnldsv) f02cff1304
Extract check for whether a user with access to a share can edit it
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-04 19:25:11 +02:00
John Molakvoæ (skjnldsv) c49469c4d8
Prevent non owners to update others link shares
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-04 08:19:07 +02:00
John Molakvoæ (skjnldsv) c8d50538b8
Use same settings for mail share as link shares
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-04 08:19:07 +02:00
Joas Schilling 15d39c48e6
Merge pull request #17021 from nextcloud/bye-spreed-hello-talk
Bye Spreed namespace, hello Talk!
2019-09-11 14:59:37 +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
Joas Schilling 70807a74c7
Correctly check for new default root
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-09-04 09:28:58 +02:00
Julius Härtl 64c63bb00b
Properly initialize the CacheJail for sharing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-09-03 18:07:59 +02:00
John Molakvoæ (skjnldsv) b557f52c22
Add expiration event for shares
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-08-21 08:30:17 +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
Joas Schilling 7aa26b28a8
Correctly check share permissions when updating a re-sub-share
Before this change the node you shared was checked for permissions.
This works when you reshare the folder that was shared with you.
However when you reshared a subfolder (e.g. as public link),
you could afterwards update the permissions and grant
create+update permissions although the share you receive was read-only.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-06-27 15:27:30 +02:00
tobiasKaminsky b65a59568e
add "askForPassword" on capabilities for sharing
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-05-13 20:09:00 +02:00
Morris Jobke 2565e16770
Fix public upload by also load the semaphore method
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-05-07 23:48:06 +02:00
Daniel Calviño Sánchez dfe9e3fb2e Do not allow JavaScript "eval" in the public share auth page with Talk
Talk no longer uses JavaScript "eval", so the Content Security Policy
can now be configured to prevent its use in the public share
authentication page when the password is protected by Talk.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-04-10 16:46:19 +02:00
Maxence Lange 749fdab3b0 do not returns shared_with === currentUser
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2019-04-01 11:17:05 -01:00
Maxence Lange 0166990f01 fixing share format
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2019-03-31 10:40:14 -01:00
Maxence Lange efbadf0cf2 issue during last push
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2019-03-31 10:40:14 -01:00
Maxence Lange 44c1feb938 returns reshares in API
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2019-03-31 10:40:14 -01:00
Morris Jobke 4b49e2eb52
Fix unnecessary boolean cast
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-06 10:12:58 +01:00
Morris Jobke fde4c54136
Merge pull request #13790 from fretn/master
Fix for crashing occ files:scan
2019-03-06 10:12:14 +01:00