Commit Graph

130 Commits

Author SHA1 Message Date
Roeland Jago Douma fb6b84b5c9
Accept shares when you open mail
Fixes #18380

When you open a direct share to yourself. We should autoaccept the
share.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-01-06 16:48:21 +01:00
Roeland Jago Douma bb4264c565
config.php setting to always accept internal shares
Part of #18255

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-16 09:07:25 +01:00
Roeland Jago Douma 97deaf85b9
Merge pull request #17935 from nextcloud/feature/noid/public-auth-for-circles
adding share type circles
2019-12-11 12:37:54 +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 0f32f8119e using IShare::
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2019-12-05 10:33:48 -01:00
Maxence Lange c1558af16d adding share type circles
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2019-12-05 10:33:48 -01:00
Roeland Jago Douma 0c0ca45d50
Actualy return data
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 14:33:13 +01:00
Roeland Jago Douma 21d7383d95
Allow internal shares to have a default expiration date
* Needs admin UI
* Needs more checks
* Basics seem to work

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 14:33:11 +01:00
Christoph Wurst 1a886b1472
Add typed events for password_policy
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-11-27 09:56:12 +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
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 520042bbd0
Allow to accept group shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-11-12 17:36:58 +01:00
Christoph Wurst a767a2f0a3
Merge pull request #17735 from tcoupin/fix-reshare-circle
Fix reshare with circle
2019-11-04 23:40:03 +01:00
Roeland Jago Douma 8085ca4cc4
Get all shares as iterable
Sometimes we need all shares or rather a specific subset of shares but
creating dedicated functions is a pain. This just returns an iterable
object for all shares so we can loop over them without allocating all
the memory on the system.

It should not be used by any user called code. But in an occ command or
background job it is fine IMO.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-10-30 09:45:27 +01:00
Thibault Coupin 7cca169d98 Fix reshare with circle
Signed-off-by: Thibault Coupin <thibault.coupin@gmail.com>
2019-10-29 14:56:52 +01: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
Julius Härtl 22b81ac1e4
Fix permission check on incoming federated shares
Since federated shares have their permissions set on the node, we do not need
to check for parent share permissions. Otherwise reshares of incoming federated
have no permission variable defined and creating them will fail

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-07-31 12:59:51 +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 e4addbae3e
Better check reshare permissions when creating a share
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-07-03 14:00:13 +02:00
Roeland Jago Douma 2f5810f26e
Merge pull request #15832 from nextcloud/bugfix/noid/fulltext-search-groupfolders
Fix full text search for groupfolders
2019-06-25 21:43:37 +02:00
Christoph Wurst 3174012adf Add event dispatcher to OCP
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-06-25 10:02:27 +02:00
Morris Jobke 9dac9710e4 Fix full text search for groupfolders
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-06-17 12:52:22 -01:00
Morris Jobke ab7858d1a9 Update lib/private/Share20/Manager.php
tabulator change

Co-Authored-By: aignerat <46312655+aignerat@users.noreply.github.com>
2019-03-20 15:33:35 +00:00
Morris Jobke bb367f8cdd Update lib/private/Share20/Manager.php
fixed tabulator

Co-Authored-By: aignerat <46312655+aignerat@users.noreply.github.com>
2019-03-20 15:33:35 +00:00
Christian Aigner 03ee137804 groupname like username - allow share with both
Signed-off-by: Christian Aigner <christian.aigner@huemer-it.com>
2019-03-20 15:33:34 +00:00
Roeland Jago Douma 230dc505a1
Fix getting the access list on external storage
If a file is on external storage there is no owner. WHich means we can't
check. So just return an empty array then.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-03-19 15:38:52 +01:00
Morris Jobke 3f9cdeeb5f
Cleanup some PHPDoc leftovers and unused variables
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-03-06 15:43:56 +01:00
Joas Schilling f66c37bdb8
Correctly determinate the owner in case of shared external storages
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-18 10:57:12 +01:00
Christoph Wurst 7e3e3bed50
Fix typos and unused return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-01-30 16:08:46 +01:00
Bjoern Schiessle 8ed004d6ae
fix typo
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2019-01-30 15:25:07 +01:00
Bjoern Schiessle ab01402599
log full exception
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2019-01-30 15:25:07 +01:00
Bjoern Schiessle a94358062d
handle mail send error gracefully
log the error in case a notification mail of a new share couldn't
be send to the recipient and finish the share operation successfully

Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2019-01-30 15:25:07 +01:00
Joas Schilling ea21aa3f7a
Use numeric placeholders if there are multiple, so that RTL languages can operate better
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-09 14:32:14 +02:00
Robin Appelman 4c0cbdff36
tokens can't be valid local user names
this saves searching for shares on non-public link dav requests

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-08-16 21:27:57 +02:00
Daniel Calviño Sánchez 4b7fa4ac2e Add support for tokens in room shares
Tokens will be used to give access to a share to guests in public rooms.
Although the token itself is created in the provider of room shares and
no changes are needed for that, due to the code structure it is
necessary to explicitly call the provider from the manager when getting
a room share by token.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-08-08 14:25:44 +02:00
Daniel Calviño Sánchez d9458b303a Add support for room shares to the share manager
Room shares are implemented in an external app (Nextcloud Talk), so in
order to keep the share manager as isolated as possible from room share
specifics all the validity checks are done in the provider of room
shares. However, due to the code structure it is necessary to explicitly
check for room shares in "generalCreateChecks" to prevent an exception
from being thrown.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-08-08 14:25:43 +02:00
Daniel Calviño Sánchez d582a66bea Honour "sendPasswordByTalk" property in mail shares
When a password was set for a mail share an e-mail was sent to the
recipient with the password. Now the e-mail is no longer sent if the
password is meant to be sent by Talk.

However, before the e-mail was not sent when the share was updated but
the password was not changed. Now an e-mail is sent in that case too if
switching from a password sent by Talk to a password sent by mail.

On the other hand, when switching from a password sent by mail to a
password sent by Talk it is mandatory to change the password; otherwise
the recipient would already have access to the share without having to
call the sharer to verify her identity.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-24 13:56:29 +02:00
Bjoern Schiessle b23032e4c5
implement federated group shares
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-11 10:11:44 +02:00
John Molakvoæ (skjnldsv) 6a0552224d
getDeletedSharedWith method
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-07-05 12:43:57 +02:00
Roeland Jago Douma d805959e81
Add API to undelete delete group shares
When a group share is deleted we keep track of this in the DB.
Right now it is only possible for a recipient to get back the share by
asking the sharer to delete it and to share it again. This doesn't
scale.

This endpoint makes it possible to get back the share.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-07-05 12:43:56 +02:00
Joas Schilling 339e320064
Fix existing usages
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-02-15 12:18:51 +01:00
Morris Jobke eb51f06a3b
Use ::class statement instead of string
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-29 12:03:47 +01:00
Morris Jobke a661f043e1
Remove unneeded semicolon and parentheses
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 23:46:40 +01:00
Joas Schilling 80b34f5f7d
Only in case of $currentAccess the array uses the id as index
Otherwise its a normal string[] with the user ids, in that
case the array_merge did it's job just fine, apart from it
not being deduplicated.
The array+array is only needed when the user id is the key,
so integer only user ids are kept as they are instead of being
reindexed.

Regression from 3820d6883d

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-28 17:17:51 +01:00
Lukas Reschke 56a2512581
Add support for `\OCP\Share\IShare::getMailSend` back
This adds back the support for `\OCP\Share\IShare::getMailSend`, one example is creating bulk shares via API which where previously blocking due to the share notification emails.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-11-27 09:38:39 +01:00
Joas Schilling 3820d6883d
Fix accesslist when a user has an ID only containting 0-9
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-14 17:21:16 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Arthur Schiwon e2805f02aa
Merge branch 'master' into autocomplete-gui 2017-11-01 15:37:29 +01:00
Julius Härtl 4cfa1c66b8
Doc: Fix phpDoc issues
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-10-23 23:23:56 +02:00
Arthur Schiwon fd6daf8d19
AutoCompletion backend
* introduce a Controller for requests
* introduce result sorting mechanism
* extend Comments to retrieve commentors (actors) in a tree
* add commenters sorter
* add share recipients sorter

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-22 14:13:32 +02:00