Commit Graph

157 Commits

Author SHA1 Message Date
Salvatore Martire
ed18c44374 fix: remove user part only at the beginning of path
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2026-02-20 16:35:37 +01:00
Carl Schwan
7b6078875b refactor: Run rector on lib/private
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:50:18 +01:00
Louis Chmn
79c07d38aa fix(files_sharing): Move path filtering to group share resolution
Previously, this was preventing users without a specific USERGROUP entry to see GROUP shares.

Signed-off-by: Louis Chmn <louis@chmn.me>
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2026-02-04 16:53:10 +01:00
Louis Chmn
b6e90acdb6 fix(DefaultSHareProvider): Specify join alias when accessing columns
Signed-off-by: Louis Chmn <louis@chmn.me>
2026-01-16 08:32:14 +01:00
Louis Chmn
bba8e90c62 fix(files_sharing): Unify getSharedWithByPath and getSharedWith
Follow-up of https://github.com/nextcloud/server/pull/57285

This ensure that the behavior is the same and reduce code duplication.

Salvatore's version seems to be more optimized, but I prefer those change to be done separately and for both methods.

Signed-off-by: Louis Chmn <louis@chmn.me>
2026-01-15 10:22:44 +01:00
Salvatore Martire
a449af6460 feat: introduce API for partial share providers
Adds support for retrieval of shares by path

Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2025-12-30 16:43:09 +01:00
Robin Appelman
bbabf50984 feat: add api to get users for share
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-12-22 15:34:23 +01:00
Carl Schwan
a011cb7780 refactor: Rename some variables in external share's manager
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-17 10:14:40 +01:00
Daniel
b8ad6d091a Merge pull request #53945 from nextcloud/chore/share-constants
Some checks failed
Integration sqlite / changes (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, --tags ~@large files_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, capabilities_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, collaboration_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, comments_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, dav_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, federation_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, file_conversions) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, filesdrop_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, ldap_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, openldap_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, openldap_numerical_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, remoteapi_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, routing_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, setup_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, sharees_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, sharing_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, theming_features) (push) Has been cancelled
Integration sqlite / integration-sqlite (master, 8.1, main, videoverification_features) (push) Has been cancelled
Integration sqlite / integration-sqlite-summary (push) Has been cancelled
Psalm static code analysis / static-code-analysis (push) Has been cancelled
Psalm static code analysis / static-code-analysis-security (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ocp (push) Has been cancelled
Psalm static code analysis / static-code-analysis-ncu (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
PHPUnit 32bits / phpunit-32bits (8.1) (push) Has been cancelled
PHPUnit 32bits / phpunit-32bits (8.3) (push) Has been cancelled
Ask for feedback on PRs / pr-feedback (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-master (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-stable22 (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-stable23 (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-stable24 (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-stable25 (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-stable26 (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-stable27 (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-stable28 (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-stable29 (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-stable30 (push) Has been cancelled
Update code signing revocation list / update-code-signing-crl-stable31 (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-master (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-stable22 (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-stable23 (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-stable24 (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-stable25 (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-stable26 (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-stable27 (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-stable28 (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-stable29 (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-stable30 (push) Has been cancelled
Update CA certificate bundle / update-ca-certificate-bundle-stable31 (push) Has been cancelled
PHPUnit SQLite / changes (push) Has been cancelled
PHPUnit SQLite / SQLite (PHP 8.1) (push) Has been cancelled
PHPUnit SQLite / SQLite (PHP 8.2) (push) Has been cancelled
PHPUnit SQLite / SQLite (PHP 8.3) (push) Has been cancelled
PHPUnit SQLite / SQLite (PHP 8.4) (push) Has been cancelled
PHPUnit SQLite / phpunit-sqlite-summary (push) Has been cancelled
PHPUnit PostgreSQL / changes (push) Has been cancelled
PHPUnit PostgreSQL / PostgreSQL 17 (PHP 8.3) - database tests (push) Has been cancelled
PHPUnit PostgreSQL / PostgreSQL 13 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit PostgreSQL / PostgreSQL 17 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit PostgreSQL / PostgreSQL 17 (PHP 8.4) - database tests (push) Has been cancelled
PHPUnit PostgreSQL / phpunit-pgsql-summary (push) Has been cancelled
PHPUnit OCI / changes (push) Has been cancelled
PHPUnit OCI / Oracle 18 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit OCI / Oracle 11 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit OCI / Oracle 21 (PHP 8.2) - database tests (push) Has been cancelled
PHPUnit OCI / Oracle 23 (PHP 8.3) - database tests (push) Has been cancelled
PHPUnit OCI / Oracle 23 (PHP 8.4) - database tests (push) Has been cancelled
PHPUnit OCI / phpunit-oci-summary (push) Has been cancelled
PHPUnit nodb / changes (push) Has been cancelled
PHPUnit nodb / No DB unit tests (PHP 8.2) (push) Has been cancelled
PHPUnit nodb / No DB unit tests (PHP 8.1) (push) Has been cancelled
PHPUnit nodb / No DB unit tests (PHP 8.3) (push) Has been cancelled
PHPUnit nodb / No DB unit tests (PHP 8.4) (push) Has been cancelled
PHPUnit nodb / phpunit-nodb-summary (push) Has been cancelled
PHPUnit mysql / changes (push) Has been cancelled
PHPUnit mysql / MySQL 8.0 (PHP 8.3) - database tests (push) Has been cancelled
PHPUnit mysql / MySQL 8.0 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit mysql / MySQL 8.4 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit mysql / MySQL 8.4 (PHP 8.4) - database tests (push) Has been cancelled
PHPUnit mysql / phpunit-mysql-summary (push) Has been cancelled
PHPUnit sharding / changes (push) Has been cancelled
PHPUnit sharding / Sharding - MySQL 8.4 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit sharding / phpunit-mysql-summary (push) Has been cancelled
PHPUnit memcached / changes (push) Has been cancelled
PHPUnit memcached / Memcached (PHP 8.2) (push) Has been cancelled
PHPUnit memcached / Memcached (PHP 8.1) (push) Has been cancelled
PHPUnit memcached / Memcached (PHP 8.3) (push) Has been cancelled
PHPUnit memcached / Memcached (PHP 8.4) (push) Has been cancelled
PHPUnit memcached / phpunit-memcached-summary (push) Has been cancelled
PHPUnit MariaDB / changes (push) Has been cancelled
PHPUnit MariaDB / MariaDB 10.11 (PHP 8.3) - database tests (push) Has been cancelled
PHPUnit MariaDB / MariaDB 10.11 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit MariaDB / MariaDB 10.3 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit MariaDB / MariaDB 10.6 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit MariaDB / MariaDB 11.4 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit MariaDB / MariaDB 11.8 (PHP 8.1) - database tests (push) Has been cancelled
PHPUnit MariaDB / MariaDB 11.8 (PHP 8.4) - database tests (push) Has been cancelled
PHPUnit MariaDB / phpunit-mariadb-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / versions (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / jsunit (push) Has been cancelled
Node tests / handlebars (push) Has been cancelled
Node tests / node-test-summary (push) Has been cancelled
PHPUnit files_external generic / changes (push) Has been cancelled
PHPUnit files_external generic / php8.2-generic (push) Has been cancelled
PHPUnit files_external generic / php8.1-generic (push) Has been cancelled
PHPUnit files_external generic / php8.3-generic (push) Has been cancelled
PHPUnit files_external generic / php8.4-generic (push) Has been cancelled
PHPUnit files_external generic / files-external-summary (push) Has been cancelled
PHPUnit files_external WebDAV / changes (push) Has been cancelled
PHPUnit files_external WebDAV / php8.2-webdav (push) Has been cancelled
PHPUnit files_external WebDAV / php8.1-webdav (push) Has been cancelled
PHPUnit files_external WebDAV / php8.3-webdav (push) Has been cancelled
PHPUnit files_external WebDAV / php8.4-webdav (push) Has been cancelled
PHPUnit files_external WebDAV / files-external-webdav-summary (push) Has been cancelled
PHPUnit files_external SMB / changes (push) Has been cancelled
PHPUnit files_external SMB / php8.1-smb (push) Has been cancelled
PHPUnit files_external SMB / files-external-smb-summary (push) Has been cancelled
Samba Kerberos SSO / changes (push) Has been cancelled
Samba Kerberos SSO / smb-kerberos-sso (push) Has been cancelled
Samba Kerberos SSO / sftp-summary (push) Has been cancelled
PHPUnit files_external sFTP / changes (push) Has been cancelled
PHPUnit files_external sFTP / php8.1-openssh (push) Has been cancelled
PHPUnit files_external sFTP / php8.4-openssh (push) Has been cancelled
PHPUnit files_external sFTP / sftp-summary (push) Has been cancelled
PHPUnit files_external S3 / changes (push) Has been cancelled
PHPUnit files_external S3 / php8.3-s3-minio (push) Has been cancelled
PHPUnit files_external S3 / php8.1-s3-minio (push) Has been cancelled
PHPUnit files_external S3 / php8.2-s3-minio (push) Has been cancelled
PHPUnit files_external S3 / php8.4-s3-minio (push) Has been cancelled
PHPUnit files_external S3 / php8.3-s3-localstack (push) Has been cancelled
PHPUnit files_external S3 / php8.1-s3-localstack (push) Has been cancelled
PHPUnit files_external S3 / php8.2-s3-localstack (push) Has been cancelled
PHPUnit files_external S3 / php8.4-s3-localstack (push) Has been cancelled
PHPUnit files_external S3 / s3-external-summary (push) Has been cancelled
PHPUnit files_external FTP / changes (push) Has been cancelled
PHPUnit files_external FTP / php8.1-proftpd (push) Has been cancelled
PHPUnit files_external FTP / php8.1-pure-ftpd (push) Has been cancelled
PHPUnit files_external FTP / php8.1-vsftpd (push) Has been cancelled
PHPUnit files_external FTP / php8.4-proftpd (push) Has been cancelled
PHPUnit files_external FTP / php8.4-pure-ftpd (push) Has been cancelled
PHPUnit files_external FTP / php8.4-vsftpd (push) Has been cancelled
PHPUnit files_external FTP / ftp-summary (push) Has been cancelled
PHPUnit primary object store / changes (push) Has been cancelled
PHPUnit primary object store / php8.1-s3-minio (push) Has been cancelled
PHPUnit primary object store / php8.1-s3-multibucket-minio (push) Has been cancelled
PHPUnit primary object store / object-store-primary-summary (push) Has been cancelled
Object storage Swift / changes (push) Has been cancelled
Object storage Swift / php8.1-swift (push) Has been cancelled
Object storage Swift / php8.2-swift (push) Has been cancelled
Object storage Swift / php8.3-swift (push) Has been cancelled
Object storage Swift / swift-primary-summary (push) Has been cancelled
Object storage S3 / changes (push) Has been cancelled
Object storage S3 / php8.1-s3 (push) Has been cancelled
Object storage S3 / php8.2-s3 (push) Has been cancelled
Object storage S3 / php8.3-s3 (push) Has been cancelled
Object storage S3 / s3-primary-summary (push) Has been cancelled
Object storage azure / changes (push) Has been cancelled
Object storage azure / php8.1-azure (push) Has been cancelled
Object storage azure / php8.2-azure (push) Has been cancelled
Object storage azure / php8.3-azure (push) Has been cancelled
Object storage azure / azure-primary-summary (push) Has been cancelled
chore(OC\Share\Constants): Remove unused SHARE_TYPE_* constants
2025-07-29 13:31:42 +02:00
Kate
49618b30a7 Merge pull request #53946 from nextcloud/chore/remove-hierarchical-shares 2025-07-29 13:26:03 +02:00
provokateurin
746e5917c7 fix(IShare): Add missing getParent and setParent methods
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-29 11:27:04 +02:00
Kate
89d659ca17 Merge pull request #51602 from nextcloud/fix/fix-default-share-folder-for-group-shares 2025-07-29 11:12:58 +02:00
provokateurin
3c7fce39aa chore(OC\Share\Constants): Remove unused SHARE_TYPE_* constants
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-29 10:39:33 +02:00
provokateurin
665a38573c fix(IShareProvider): Add missing getChildren method to the interface
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-29 10:26:33 +02:00
provokateurin
5bd626bd40 chore: Fix all method calls with too many arguments
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-22 12:34:49 +02:00
Côme Chilliet
12ceeacb0e fix: Use default share folder of the user on share accept
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-08 13:24:37 +02:00
provokateurin
ae16a28758 perf(Share20): Add interface to query all shares in a folder without filtering by user
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-08 15:29:40 +02:00
Marcel Klehr
b464469bc1 perf(sharing): Use oc_share.{item_type, share_type} IN instead of OR equals
to improve performance by using the db index

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-03-25 09:42:06 +01:00
Louis Chemineau
b6c7c28585 fix: Exclude non accepted shares when computing access list
Signed-off-by: Louis Chemineau <louis@chmn.me>
2025-01-30 09:57:14 +01:00
Git'Fellow
20215fbd09 fix(shares): Remove noisy text from emails
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-12-16 15:16:33 +01:00
Git'Fellow
f86fb0fee2 fix(share): Don't print twice the same information
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-12-10 18:27:31 +01:00
provokateurin
a978e0a806 fix(Share20\DefaultShareProvider): Return link shares in getSharesByPath()
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-25 10:27:31 +01:00
provokateurin
762b09049b fix(Share20\DefaultShareProvider): Sort getSharesByPath() results
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-25 10:27:31 +01:00
Ferdinand Thiessen
2ef74b9860 Merge pull request #47329 from nextcloud/feat/add-datetime-qbmapper-support
feat(AppFramework): Add full support for date / time / datetime columns
2024-10-18 19:05:08 +02:00
Git'Fellow
a1681b0756 chore(db): Apply query prepared statements
Fix: psalm

fix: bad file

fix: bug

chore: add batch

chore: add batch

chore: add batch

fix: psalm
2024-10-17 20:30:47 +02:00
Ferdinand Thiessen
db94e10af0 fix: Prevent breaking change in IQueryBuilder
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-17 18:31:44 +02:00
Ferdinand Thiessen
e314d52118 fix: Adjust parameter type usage and add SQLite support
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-17 18:31:44 +02:00
Ferdinand Thiessen
2e4d3e4e75 fix(share): Return empty string if no label is set
* Resolves: https://github.com/nextcloud/server/issues/48629

While the database supports NULL, the typing has always said it only returns *string*.
So to not break any apps that might trust the typings we should return `''` if the database is set to `NULL`.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-10-14 15:15:51 +02:00
Stefan Cherniakov
457eaee2b3 fix(files_sharing): Add missing check for null & use bool instead of int for reminder_sent field
Signed-off-by: Stefan Cherniakov <luka-sama@pm.me>
2024-09-03 17:23:31 +02:00
Stefan Cherniakov
d633b9bce6 fix(files_sharing): Make share reminders more stable & fix issues
Signed-off-by: Stefan Cherniakov <luka-sama@pm.me>
2024-09-03 13:37:17 +02:00
Robin Appelman
cc091b150e fix: fix share cleanup for deleted groups with sharding
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 10:21:20 +02:00
Robin Appelman
f5b3486744 feat: add option to automatically partition queries by specific tables
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-28 10:18:53 +02: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 +02:00
Côme Chilliet
e23325f047 fix: Remove shares only if there are no more common groups between users
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-08-12 15:20:21 +02:00
Louis Chemineau
5559beb28c fix(files_sharing): Delete user shares if needed when user is removed from a group
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-08-12 14:41:19 +02:00
Ferdinand Thiessen
3d136e4466 fix: Add acceptShare as an interface
It was commented out because at that time no other share provider
supported the `acceptShare` method. Today it is the same no other provider
supports it, but we should make it discoverable by adding it to the public API
as an additional interface.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-30 15:25:51 +02:00
skjnldsv
967b3848e0 fix(files_sharing): phpunit & openapi fixes
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +02:00
skjnldsv
30f9ef414e fix: psalm, cs, autoloader and lint
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +02: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 +02:00
skjnldsv
c253112cf7 chore(files_sharing): refactor mail handling
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +02:00
skjnldsv
d388370c3b feat(files_sharing): implement IShareProviderWithNotification and refactor sendMailNotification
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-07-12 20:14:30 +02: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 +02:00
Robin Appelman
7f6a891110 use LazyUser in DefaultShareProvider
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-06-17 17:42:45 +02:00
Andy Scherzinger
dae7c159f7 chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +02:00
Robin Appelman
ccd56672e8 refactor: remove non-shallow getSharesInFolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-05-01 16:46:06 +02:00
skjnldsv
c0e7ea55df fix(sharing): resolveGroupShares setPermissions on null
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-03-19 13:09:10 +01:00
Robin Appelman
0e7497296f perf: improve performance of resolving group shares
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-16 13:20:08 +01:00
Robin Appelman
bfeb97c54a fix: also filter by storage when getting shares in folder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-06 15:33:05 +01: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 +01:00
Hamid Dehnavi
ea06cf2f39 Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +03:30