Commit Graph

472 Commits (b9ab00a59e2d906fdb43eaaea37eb7a4a9cc8a13)

Author SHA1 Message Date
Anna Larch 8af7ecb257 chore: adjust code to adhere to coding standard
Signed-off-by: Anna Larch <anna@nextcloud.com>
2024-09-05 21:23:38 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Ferdinand Thiessen dd58e5290f
feat: Use new password context in sharing API
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-22 19:16:55 +07:00
Andy Scherzinger f0b658014a
Merge pull request #47070 from nextcloud/circToTeam
fix(share): Rename Circle to Team
2024-08-06 23:25:47 +07:00
skjnldsv db28aa8cd1 fix(files_sharing): show proper share not found error message
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-08-06 16:25:10 +07:00
Git'Fellow 6002566d92
fix(share): Rename Circle to Team
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-08-06 14:48:07 +07:00
Maxence Lange b6e3009e12
Merge pull request #47043 from nextcloud/fix/noid/ignore-root-on-inherited-shares
fix(inherited-shares): ignore top root folder
2024-08-06 11:08:17 +07:00
skjnldsv 712965daa1 fix(files_sharing): filter out invalid shareWith in sharee API
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-08-05 20:36:45 +07:00
Maxence Lange 6c4b0dba77 fix(inherited-shares): ignore top root folder
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2024-08-05 13:40:53 +07:00
provokateurin 9128a23af1
refactor(files_sharing): Replace security annotations with respective attributes
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-07-27 22:42:51 +07:00
skjnldsv 43ca07809d fix(files_sharing): file request creation permissions and link copy display
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-18 19:47:11 +07:00
skjnldsv bb730a1ee3 fix(files_sharing): remove undesirable translations from ShareAPIController
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-16 08:33:53 +07:00
skjnldsv df42a10e56 chore(files_sharing): lint & refactor fixes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
skjnldsv 9b84831c8d fix(files_sharing): adjust IAttributes API and files_versions
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
skjnldsv 967b3848e0 fix(files_sharing): phpunit & openapi fixes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
skjnldsv bc5839e5b5 chore(files_sharing): cleanup NewFileRequestDialog vue
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
skjnldsv 30f9ef414e fix: psalm, cs, autoloader and lint
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
skjnldsv 5ce4bb368f chore(files_sharing): refactor share password mail
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
skjnldsv 75ca4944c9 feat(files_sharing): allow mixed values in share attributes and allow storing email arrays
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
skjnldsv c253112cf7 chore(files_sharing): refactor mail handling
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
skjnldsv d388370c3b feat(files_sharing): implement IShareProviderWithNotification and refactor sendMailNotification
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
skjnldsv 443c48aefb feat(files_sharing): add `new file request` option
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +07:00
fenn-cs 6136112be1 docs(ShareApiController): Correct note about expiry date timezone
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-07-01 13:53:18 +07:00
Louis Chemineau f5fd6c8f08
fix(files_sharing): Store the expiration date relative to the server's timezone
This is needed as we want to store the difference between the server's and the user's timezones.

Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-06-26 12:49:42 +07:00
Andy Scherzinger 1e04619675
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-06-06 22:53:41 +07:00
fenn-cs c8a90f04b7 fix(ShareApiClients): Maintain meaning of `''` and null for share api clients
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-05-29 12:36:26 +07:00
fenn-cs 59a5b4e0bd fix(shareManager): Respect empty `expireDate` in server
If `expireDate` is an empty string and not `null` then the server should not set a default.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-05-23 14:11:33 +07:00
Joas Schilling 490f545006
fix(sharing): Don't change the type of the controller argument
[EA] New value type (\DateTime) is not matching the resolved parameter type and might introduce types-related false-positives.

Signed-off-by: Joas Schilling <coding@schilljs.com>
2024-04-18 14:31:45 +07:00
fenn-cs ec8a0a6267 fix(shareApiController): avoid duplicated expiryDate operations
`expireDate` can be set once and used anywhere needed, the current implementation,
duplicates this behavior which leads to `parseDate` receiving an a date object it
parsed and returend earlier in the createShare method.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-04-18 02:01:13 +07:00
fenn-cs 9a0913afdc refactor(shareApiController): use contrusctor property promotion & DI logger
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2024-04-18 02:01:08 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Ferdinand Thiessen 2be421785f
fix(files_sharing): ShareesAPI - Return empty response when user is not allowed to share
Resolves: https://github.com/nextcloud/server/issues/20950

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-03-15 15:51:15 +07:00
Robin Appelman e7a7b4a401 perf: switch places that always use the first getById result to getFirstNodeById
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-04 13:57:31 +07:00
Benjamin Gaussorgues 3f269782aa
Merge pull request #43428 from nextcloud/feat/share-expiration-with-time 2024-02-26 10:07:41 +07:00
Aragon Gouveia 311d1d2306 fix truncated circleId returned from Share API 2024-02-23 14:43:31 +07:00
Benjamin Gaussorgues 01983d50d4
feat(share): save date and time for expiration
Because of timezones, not saving time can lead to unexpected behaviour
when sharing an item sooner than timezone offset
Example: sharing a file before 9am when in UTC+9

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-02-22 11:26:01 +07:00
F. E Noel Nfebe 3fb1674251
Merge pull request #43461 from nextcloud/fix/get-rid-of-getlogger
chore: Migrate away from OC::$server->getLogger
2024-02-14 10:47:22 +07:00
Vincent Petry 839ddaa354
feat: rename users to account or person
Replace translated text in most locations

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2024-02-13 21:06:30 +07:00
Côme Chilliet c0ce272e9c chore: Migrate away from OC::$server->getLogger
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-13 17:32:30 +07:00
provokateurin b64ab5fba8
refactor: Migrate IgnoreOpenAPI attributes to OpenAPI
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-01-18 16:14:17 +07:00
Benjamin Gaussorgues cc3a2c351a
fix(share): use user timezone to parse share expiration date
If an user in UTC+1 try to create a share at 00:00, it's day D for him, but
D-1 for the server (UTC).
This fix aims to apply the correct offset

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2024-01-09 17:28:11 +07:00
John Molakvoæ 82b5a19a35
fix: public dav and files_sharing testing fixes
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2024-01-09 10:56:14 +07:00
John Molakvoæ 7b6a650b6e
feat: public dav endpoint v2
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2024-01-09 10:56:06 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
jld3103 755de1e0b5 refactor: Rename OpenAPI type aliases to their namespaces
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-11-02 11:37:15 +07:00
Joas Schilling 91ebbe8003
fix(federation): Use `sharing.federation.allowSelfSignedCertificates` config for all OCM requests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-10-11 11:52:10 +07:00
jld3103 c2d45cb172
Add single status code descriptions for OpenAPI
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-09-27 08:05:21 +07:00
Maxence Lange 8b9e7e235d ocm controller
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-09-20 08:23:45 +07:00
jld3103 c6806684d2
files_sharing: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-07-31 16:58:49 +07:00
John Molakvoæ 8e1c693be5
fix(files_sharing): error and size/mtime for deleted shares
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-07-11 13:55:10 +07:00
John Molakvoæ f5f142d31b
fix: adjust testing
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-07-11 13:52:28 +07:00
John Molakvoæ 6f54f72bb4
feat(sharing): add sharing overview view
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2023-07-11 13:52:27 +07:00
Benjamin Gaussorgues 29c1848eda
Migrate files sharing to PSR LoggerInterface
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-07-06 14:08:42 +07:00
Maxence Lange d2efd0e03c displayname on federated shares
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-06-28 09:28:03 +07:00
Faraz Samapoor 12e3594299 Refactors "strpos" calls in /apps/files_sharing to improve code readability.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-02 20:08:40 +07:00
Louis Chemineau 6b53e4b13a Mutualize expireDate handling when creating and updating a share
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-04-27 16:26:24 +07:00
rakekniven 86b17e2248 Update apps/files_sharing/lib/Controller/ShareAPIController.php
Co-authored-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2023-04-18 12:08:38 +07:00
rakekniven eaaeb32074 fix(l10n): Fixed grammar
Reported at Transifex.
  
Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>


Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2023-04-18 12:08:38 +07:00
Michiel de Jong c0e84cb512 Add SHARE_TYPE_SCIENCEMESH
Signed-off-by: Michiel de Jong <michiel@unhosted.org>
2023-03-08 16:46:55 +07:00
Julius Härtl 38ca468502
Merge pull request #36515 from nextcloud/fix/sharees-remove-deck 2023-02-16 21:17:16 +07:00
Vincent Petry 1fed799826
Merge pull request #36452 from nextcloud/perf/share-availability-check
perf(federation): Only request root share info for checking availability
2023-02-03 13:34:35 +07:00
jld3103 30858df737
Remove Deck from Sharees API
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-02-03 12:01:37 +07:00
Louis Chemineau 4ab3c16403 Pluggable share provider
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-02-02 15:41:26 +07:00
Julius Härtl 7e3ea019d1
chore: Add return types
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-01-31 11:42:33 +07:00
Julius Härtl 7cc9ba28a7
perf(federation): Only request root share info for checking availability
Otherwise this would request a full recursive dirctory listing while the result is never being used

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-01-31 11:41:34 +07:00
Jan-Philipp Litza a7abe2c35a Honor permissions of new link share via OCS API
The API currently overrides the supplied permissions with "read only"
when a file is shared via link. It allows to update the permissions
later, however.

This keeps the default to "read only" but honors the permissions
supplied by API call if any.

Signed-off-by: Jan-Philipp Litza <jpl@plutex.de>
2022-12-06 16:00:20 +07:00
Julius Härtl 8629d8e44f
Check share attributes on preview endpoints
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-25 11:35:31 +07:00
Carl Schwan 0de71a73e5
Merge pull request #34502 from nextcloud/fix/correct-attribute-resharing
Propagate attributes when resharing
2022-10-20 17:03:02 +07:00
Carl Schwan 54031e370a Fix various other small psalm issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 12:40:35 +07:00
Carl Schwan 60313683e2 Fix checkpassword undocummented null parameter
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 12:38:21 +07:00
Carl Schwan c6b8a3bec3 Fix permission not being int
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 12:37:46 +07:00
Carl Schwan 53e408f76a Fix exception getCode type
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 12:36:50 +07:00
Carl Schwan 3a11128e6c Fix type when getting appconfig with int
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-17 12:36:05 +07:00
Simon L d967488ec0
Merge pull request #34544 from nextcloud/fix/more-flexible-date-validation
More flexible date validation
2022-10-13 01:10:55 +07:00
Carl Schwan 9eb67ad57d More flexible date validation
Fix #34542

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-11 23:02:10 +07:00
Carl Schwan 8e3f21d9ed Small progress with fixing unit tests
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-11 14:00:15 +07:00
Carl Schwan cf39885b53 Propagate attributes when resharing
When updating a share, load the node from the initiator instead of the
owner similar to how this is done when creating the share.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-10 17:06:29 +07:00
Roeland Jago Douma c6e100ed32
type closure to make psalm a bit happier
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2022-10-09 21:41:18 +07:00
tobiasKaminsky 610bbaed68 includeTags -> include_tags
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2022-09-28 13:17:56 +07:00
Tobias Kaminsky 5b3fb7a8ff
Update apps/files_sharing/lib/Controller/ShareAPIController.php
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Tobias Kaminsky <tobias@nextcloud.com>
2022-09-21 08:28:03 +07:00
tobiasKaminsky ebd28ef9e0
Show include tags on single share
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2022-09-19 11:36:52 +07:00
tobiasKaminsky 4a4a3874da
Add includeTags to /share/id 2022-09-19 11:11:09 +07:00
Carl Schwan 02d55eb90f
Merge pull request #33941 from nextcloud/fix/public-sharing
Only normalize data in public shares and not crud
2022-09-15 16:43:01 +07:00
Carl Schwan 7ded5a769b
Only normalize data in public shares and not crud
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-08 14:51:28 +07:00
luz paz 9d26671f05 Fix typos in apps/ subdirectory
Found via `codespell -q 3 -S l10n,./apps/files_external/3rdparty -L adn,ba,boxs,keypair,jus,optionel,ressource,tabel ./apps/`

Signed-off-by: luz paz <luzpaz@github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-09-05 12:59:54 +07:00
Max 99aa938452 feature: first take on using the viewer to render single file shares
Signed-off-by: Max <max@nextcloud.com>
2022-08-25 21:59:19 +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 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
Joas Schilling 148498bba5
Merge pull request #32741 from nextcloud/Valdnet-patch-2
l10n: Delete apostrophe
2022-06-10 15:54:14 +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
Valdnet dfe7243338
l10n: Delete apostrophe
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2022-06-07 16:41:38 +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
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
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