Commit Graph

79 Commits (65f52c47b83a2511e8e18f9c36d8644196187af3)

Author SHA1 Message Date
Carl Schwan 49d522717c refactor(dbal): Port away from remaining IQueryBuilder::execute calls
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-10-13 13:44:15 +07:00
Carl Schwan 8555f98e32 refactor: Port External\Manager to the query builder
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-09-16 11:36:12 +07:00
Robin Appelman aa15f9d16d
chore: run rector
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-07-01 22:45:52 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
provokateurin 9f59204148
fix(files_sharing): Gracefully handle fetching non-existent share
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-01-13 15:21:20 +07:00
skjnldsv 5c359e424f feat(federatedfilesharing): auto-accept shares from trusted servers
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-01-09 12:54:51 +07:00
skjnldsv bc0ad5efbf fix(federatedfilesharing): get share by token fallback
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2024-12-28 09:27:30 +07:00
provokateurin 77114fb327
fix(OpenAPI): Adjust array syntax to avoid ambiguities
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-11-05 09:58:11 +07:00
provokateurin 381077028a
refactor(apps): Use constructor property promotion when possible
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-21 12:37:59 +07:00
dependabot[bot] bb598c8451
chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixer
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/nextcloud/coding-standard/releases)
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/coding-standard/compare/v1.3.1...v1.3.2)

---
updated-dependencies:
- dependency-name: nextcloud/coding-standard
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-19 07:57:35 +07:00
Côme Chilliet 1580c8612b
chore(apps): Apply new rector configuration to autouse classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-10-15 10:40:25 +07:00
provokateurin 9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
Christoph Wurst c57e684e7b
fix: Handle null checks with the ?? operator
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 21:50:11 +07:00
Christoph Wurst 614f9ec0a2
refactor: Use the elvis operator
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 21:01:34 +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
Andy Scherzinger 1e04619675
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-06-06 22:53:41 +07:00
Robin Appelman efe68d012c
Merge pull request #39044 from nextcloud/more-empty-mount-checking
Fix root mounts not being setup in some cases
2023-10-24 16:54:05 +07:00
Hamid Dehnavi d64bbc8bd3 Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 12:18:41 +07:00
Robin Appelman 5685d68bd3
add more checks to ensure mounts aren't empty
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-12 16:50:24 +07:00
Côme Chilliet 74811813e7 Avoid extra parenthesis around SQL in IN expressions
The expression builder already suround the SQL with parenthesis when
 using in(), so we must not add another pair, this confuses at least
 sqlite.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-21 13:37:30 +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
Robin Appelman de5af8efbf
invalidate mount cache after accepting or renaming federated share
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-25 14:18:36 +07:00
Robin Appelman 1c468129af
adjust tests to new fs setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:59 +07:00
Robin Appelman ab275c5e38
move files_sharing to IBootStrap
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-10-19 11:31:07 +07:00
Hinrich Mahler 961f8958c0
Let users choose a share_folder 2021-09-06 16:39:11 +07:00
Vincent Petry f6f2f63016
Fix remote share deletion when deleting user
When deleting a user, we should only delete the direct remote user
shares or the remote group based subshares.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 14:32:51 +07:00
Vincent Petry dac676c14e
Replace ILogger with LoggerInterface in remote share manager
Signed-off-by: Vincent Petry <vincent@nextcloud.com>

Co-authored-by: Carl Schwan <carl@carlschwan.eu>
2021-07-27 13:04:39 +07:00
Vincent Petry e67e90afce
Fix remote group share decline+accept code path
When declining a remote group share through the dialog that appears when
notifications are off, the mount point is now correctly saved when
re-accepting.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:20:03 +07:00
Vincent Petry e8f4a524a2
Fix external share manager with multiple user groups
Use query builder with proper matching for finding the group names.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:19:26 +07:00
Vincent Petry 15f41a6b72
Fix remote group share API interactions
Accepting and declining can now be done repeatedly on both the parent
group share and sub-share with the same effects.

Added unit tests to cover these cases, and also when the same operation
is repeated.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:19:26 +07:00
Vincent Petry 4b5bb4d9cf
Fix re-accepting or re-rejecting remote group shares
When accepting a group share, a sub-share entry is created which also
has a different id.

When accepting or rejecting the sub-share, simply update the "accepted"
flag instead of trying to re-insert the entry.

Adjust getShare to also properly validate group share membership
when called on a sub-share id.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:19:24 +07:00
Vincent Petry cff8ae7ded
Add logging to external shares manager
Instead of just returning false, also log the exception to make
debugging database issues easier.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:19:24 +07:00
Vincent Petry 7130a98e47
Fix received federated group shares
Fix pending shares endpoint to consider user-specific sub-entries
for group shares whenever a share was accepted or declined.

Added unit test for adding remote group shares.

Fixed "removeUserShares" to not send a remote request as we never send
remote requests for group shares.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-07-27 12:19:23 +07:00
Louis Chemineau ebf35fb38a Correctly check the reception of a remote feedback
Signed-off-by: Louis Chemineau <louis@chmn.me>
2021-06-09 15:37:18 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst 8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 11:45:19 +07:00
Julius Härtl aefe826202
Adjust default
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-08 16:06:10 +07:00
Julius Härtl f68f67f354
Move remoteId of remote reshares to string
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-12-08 16:03:24 +07:00
Morris Jobke dc479aae2d
Improve CertificateManager to not be user context dependent
* removes the ability for users to import their own certificates (for external storage)
* reliably returns the same certificate bundles system wide (and not depending on the user context and available sessions)

The user specific certificates were broken in some cases anyways, as they are only loaded if the specific user is logged in and thus causing unexpected behavior for background jobs and other non-user triggered code paths.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-03 00:13:01 +07:00
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
Christoph Wurst 1f7f93a695
Update license headers for Nextcloud 20 (again)
There are still lots of outdated headers, so time for another round of
updates.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-09-07 14:37:44 +07:00
Julius Härtl f96853a19c
Do not fail if share for mountpoint is no longer available
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-03 11:17:59 +07:00
Joas Schilling d4a4d5c6ef
When no user is logged in null is used
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-29 09:42:54 +07:00
Morris Jobke 0763a17332
Move federated_share_added into a typed event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-23 08:33:17 +07:00
Joas Schilling 89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 16:49:16 +07:00
Christoph Wurst 09a632242d
Do not only catch Exceptions but any Throwable during rmt share delete
When a remote share is deleted, we notify the remove instance. This may
trigger various error conditions, which we want to catch in order to
avoid undeletable shares. The try-catch, however, did only capture
exceptions, so things like TypeErrors were not caught and caused the
process to fail hard.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-02 09:21:09 +07:00
Christoph Wurst 28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +07:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +07:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +07:00