Commit Graph

1471 Commits (17c2deff76e100b021ebbf5124584b6ba29cf05d)

Author SHA1 Message Date
Robin Appelman 8367b99c59
fix external share scanner not propagating locking-opt-out
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-03 17:12:30 +07:00
Carl Schwan 6ba9a4a752
Disable locking on federated shares
The old inneficiant code didn't do locking and adding locking is
creating issues

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-03 15:17:55 +07:00
Carl Schwan fa48430feb
Revert "Revert "Remove inefficient fed share scanner""
This reverts commit 6667007bf2.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-03 15:17:51 +07:00
Carl Schwan 7b723813ce
Multiple fixes
- Fix tests
- Use non deprecated event stuff
- Add a bit of type hinting to the new stuff
- More safe handling of instanceOfStorage (share might not be the first
  wrapper)
- Fix resharing

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-31 19:37:59 +07:00
Carl Schwan ab1a20522b
Enforcing permission during resharing
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-28 16:54:13 +07:00
Vincent Petry bbb5043c07
Inherit hide download from share attributes
When resharing by link, if the download permission was removed through
share attributes, convert it to the hide download flag.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:54:13 +07:00
Vincent Petry 3cfb4cbf94
Block download when needed on direct download endpoint
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:54:13 +07:00
Vincent Petry 2ee659e547
Fix view-only code after code review comments
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:24 +07:00
Vincent Petry 54a0d8fe64
Don't reset share attributes when not specified
When not specified in the OCS call, don't reset the share attributes.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:23 +07:00
Vincent Petry 03b1791cca
Fix share attribute related tests + code style
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:22 +07:00
Vincent Petry 9493f86de3
Fix share controller to accept share attributes alone
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:22 +07:00
Vincent Petry a95c19e14b
Add share attributes + prevent download permission
Makes it possible to store download permission

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-28 16:53:22 +07:00
Louis Chemineau f525067930 Add argument to getSharesInFolder enable deep share lookup
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-07-26 12:17:46 +07:00
Louis Chemineau 0fb4ecadae Recursively fetch subshares
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-07-26 12:17:46 +07:00
Louis Chemineau 13e7ebbe4b Change share owner when moving share out of share
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-07-26 12:17:46 +07:00
Vincent Petry 8ca910976d Update owner of subdir on move into/out of share
When moving a directory into or out of a received share, make sure to
also update the share owner column for shares that exist insie the
directory.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-07-26 12:17:46 +07:00
Carl Schwan d5c23dbb9f Move CappedMemoryCache to OCP
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-14 15:54:31 +07:00
Vincent Petry 85cc867143
Merge pull request #31771 from nextcloud/fix/hook-encryption-cron
Fix hook encryption with cron job
2022-06-10 16:27:59 +07:00
Joas Schilling 148498bba5
Merge pull request #32741 from nextcloud/Valdnet-patch-2
l10n: Delete apostrophe
2022-06-10 15:54:14 +07:00
Vincent Petry 6ee4e0b94c
Merge pull request #32806 from nextcloud/fix-federated-sharing
Revert "Remove inefficient fed share scanner"
2022-06-10 15:47:13 +07:00
Carl Schwan 6667007bf2 Revert "Remove inefficient fed share scanner"
This reverts commit ce31914314.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-10 10:29:42 +07:00
Cyrille Bollu 50badb3fb6 Various improvements related to the recent implementation of temporary passwords
for mail shares:

1- Changes style of "forgot password?" and "Back" button
2- Adds information about share password's expiration time in the emails sent.
3- Shows password expiration time in the Share menu
4- Fixes an issue when the message "Password expires..." would be shown for non email share types (which don't have temporary passswords)
5- At share's creation, password should only be sent when it's a permanent one

See also https://github.com/nextcloud/server/issues/31952

Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-06-08 11:29:19 +07:00
Joas Schilling 50c697dbd4
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-06-07 20:40:55 +07:00
Carl Schwan 5907bba3fd Fix hook encryption with cron job
Make sure the setup fs is set before using the Update service

Fix #29674

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-07 15:38:45 +07:00
Valdnet dfe7243338
l10n: Delete apostrophe
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2022-06-07 16:41:38 +07:00
Carl Schwan e4378fd18c
Merge pull request #32349 from nextcloud/enh/projects-event
Add event to load additional scripts for projects
2022-05-27 18:36:40 +07:00
Carl Schwan ec6b83cc18 Add stricter psalm type for CappedMemoryCache
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:06:18 +07:00
Julius Härtl ae0e9ff083
Move files_sharing over to new event for projects
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-12 10:50:13 +07:00
blizzz 102d119297
Merge pull request #32053 from nextcloud/cache-verify-share-mountpoint
cache the verification of the share mountpoint
2022-04-22 14:36:49 +07:00
Carl Schwan ed4c1e584f Update cache when display name change
This improve the correctness of the data

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-22 10:29:18 +07:00
Carl Schwan 4333c215cb Cache display name
This should saves some query in the share backend when displaying the
owner and it's not important if the display name is 10 minutes outdated
as it is very rare that this gets changed.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-22 10:22:15 +07:00
John Molakvoæ 54532b2df3
Merge pull request #32050 from nextcloud/share-cache-owner-name 2022-04-22 08:13:38 +07:00
Robin Appelman bda8601648
cache the verification of the share mountpoint
after the initial verification this can only really be invalidated by a system mount (external/group/etc) being created at the share target since any normal file/folder creation will already conflict with the share

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-21 18:08:35 +07:00
Robin Appelman 1f1b2a32cb
cache the share owner name for formating cache entries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-21 17:33:18 +07:00
Robin Appelman e3ade5507d
also apply the fix for the other storage types
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-21 15:00:42 +07:00
Robin Appelman f6d5eb9a75
improve optimization for SharedStorage::instanceOfStorage(Common)
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-21 14:51:09 +07:00
Vincent Petry f5c8fa4f11
Properly reset pw expiration
When requesting a new password for share by mail link, now we correctly
reset the expiration date.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-04-13 15:46:30 +07:00
Vincent Petry 483741ff36
Merge pull request #31220 from nextcloud/enhancement/31005/temporary-passwords
Temporary passwords for public non-anonymous protected shares (ie: files shared with an email recipient).
2022-04-12 09:46:31 +07:00
Cyrille Bollu c6a5c07041 Adds a "Request password" button to the public share authentication page for shares
of type TYPE_EMAIL, when the "video verification" checkbox isn't checked. Users accessing
non-anonymous public shares (TYPE_EMAIL shares) can now request a temporary password themselves.

- Creates a migration step for the files_sharing app to add the 'password_expiration_time'
  attribute to the oc_shares table.
- Makes share temporary passwords' expiration time configurable via a system value.
- Adds a system config value to allow permanent share passwords

-Fixes a typo in a comment in apps/files_sharing/src/components/SharingEntryLink.vue

See https://github.com/nextcloud/server/issues/31005

Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
2022-04-11 21:58:24 +07:00
Robin Appelman 9834350ac3
Merge pull request #31713 from nextcloud/fed-performance
Federated share performance improvements
2022-04-07 18:53:36 +07:00
Carl Schwan d7e094836b
Merge pull request #31845 from nextcloud/querybuilder-shareexternal
Use querybuilder for share external mountpoint
2022-04-07 17:53:58 +07:00
Carl Schwan 579c6b1e5a Use querybuilder for share external mountpoint
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-06 10:18:36 +07:00
Simon L 1ceb6cdb38
Merge pull request #31684 from nextcloud/user-share-permissions-merge
take permissions from multiple paths into account for share permissions
2022-04-05 17:37:46 +07:00
Vincent Petry 0cdf03b733
Merge pull request #31773 from nextcloud/share-limited-owner-setup
Perform a limited filesystem setup when getting share source
2022-04-05 17:05:57 +07:00
Robin Appelman 5e2dd29aaf
only request free space once for external shares
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 16:48:27 +07:00
Robin Appelman 802e59243b
use all possible permissions dav properties
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 16:48:24 +07:00
Robin Appelman 89d3cd1447
don't overwrite the etag from storage backends that already provide "good" etags
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 16:48:18 +07:00
Côme Chilliet ef5ca766e9
Set oc_share_external.name column length to 4000 to remove arbitrary limitation
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-04 16:28:06 +07:00
Robin Appelman 74c97e2571
use UserFolder to get the share source node
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 14:57:53 +07:00
Robin Appelman 278b13155a
take permissions from multiple paths into account for share permissions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-31 16:47:35 +07:00