Commit Graph

113 Commits (stable20)

Author SHA1 Message Date
Christoph Wurst 94a95ffceb
Fix invalid usage of \Exception::getResult
Only OCS exceptions have a getResult method. Any other exception will
cause another error due to this invalid method call.

This splits the catch into a specific one for OCS and then a generic one
for anything else that can't be handled.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
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>
4 years ago
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Joas Schilling 0c77cd21f9
Make sure maintenance mode is always casted to bool
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Julius Härtl 3e21033dfc
Fix undefined constant error for STATUS_SERVICE_UNAVAILABLE
Signed-off-by: Julius Härtl <jus@bitgrid.net>
6 years ago
Morris Jobke 79d9841bce
Replace hardcoded status headers with calls to http_response_code()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Roeland Jago Douma e628424ccf
Warn about the old OCP\API::register construct for OCS
* Add sleep
* Add log message

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Morris Jobke ca74a54dfa
Remove "DEBUG OUTPUT:" from failing OCS API requests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Roeland Jago Douma b8af7ee9bc
Nextcloud 13 is not compatible with newer than php 7.2
Just to avoid users from trying this with a to new (untested) php version

* Moved the check logic to 1 place
* All directly callable scripts just require this on top
* exit hard (-1) so we know scripts won't continue
* Return status 500 so no sync clients will try fancy stuff

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Roeland Jago Douma 87e10f9e6a
OC_OCS_Response is deprecated
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Lukas Reschke 80b649c471
Suppress deprecated function in \OCP\JSON
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
7 years ago
Roeland Jago Douma 7753b93aa6
PrivateData to app
* PrivateData is an app now: https://github.com/nextcloud/privatedata
* No need to load the OCS routes.php (as there is none!)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Joas Schilling 9f3d9b5b23
Don't force the use of Accept-Language anymore
This is not intended anymore, since it falls back to force english
when the header is not set. Also 0228bc6e66
makes clear that the order should be:

1. User setting
2. Accept language
3. Admin default

This is the case since the commit from above, unless via OCS and DAV.
Both forced to accept-language falling back to english.
By removing the force, it now also matches the w3 priority list:
https://www.w3.org/International/questions/qa-lang-priorities

Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Morris Jobke 6174a514b7
Get rid of static OCS::notFound()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Morris Jobke 9533f4e5ed
Clean up single user mode
Single user mode basically disables WebDAV, OCS and cron execution. Since
we heavily rely on WebDAV and OCS also in the web UI it's basically useless.
An admin only sees a broken interface and can't even change any settings nor
sees any files. Also sharing is not possible.

As this is at least the case since Nextcloud 9 and we haven't received any
reports for this it seems that this feature is not used at all so I removed it.

The encryption commands now rely on the well tested maintenance mode.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Robin Appelman e7e614d801
log ocs exceptions
Signed-off-by: Robin Appelman <robin@icewind.nl>
7 years ago
Vincent Petry 00f135d320
Die in OCS v1.php on exception
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
8 years ago
Roeland Jago Douma 1baa2b8deb
Move OC\OCS\Person to OCSController
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years ago
Joas Schilling f3319f6294
Allow to call the files even when you are in another instance atm
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
Roeland Jago Douma 2812755359
Move federated sharing routes to the federatedfilesharingapp
* Move routes to app
* Move routes over to the AppFramework
* Fix tests

There is plenty of stuff to fix properly here. But out of scope for now.
8 years ago
Roeland Jago Douma 6bc1c6590c
Move /config over to Core OCSController 8 years ago
Roeland Jago Douma 69da896785
Move /cloud/user to Core app 8 years ago
Roeland Jago Douma 02449c8336
Move getCapabilities over to Core 8 years ago
Roeland Jago Douma 8ae49183c1
Catch LoginException 8 years ago
Joas Schilling 0215b004da
Update with robin 8 years ago
Joas Schilling ba87db3fcc
Fix others 8 years ago
Lukas Reschke c90a71a83b
Only login if user is not logged-in 8 years ago
Roeland Jago Douma 1caceea6c0
Make the OCS endpoint handle the new OCS AppFramework routes 8 years ago
Bjoern Schiessle dc53788711
remove unused parameter 8 years ago
Christoph Wurst d36a1fed3e load authentication apps first (#25126)
* load authentication apps first

* load session apps before all other apps
8 years ago
Lukas Reschke aba539703c
Update license headers 8 years ago
Björn Schießle 2dc26aada7
update share permissions 8 years ago
Björn Schießle d23df4cba7
create re-share by owner and propagate unshare and unshare-from self request
correctly accross share owner and share initiator
8 years ago
Björn Schießle 8f87e1104d
use query builder for getShare and add tests 8 years ago
Björn Schießle 5a1641bed2
move request handler for federated shares to the federated sharing app 8 years ago
Björn Schießle e10105474f
move federated sharing settings to the federatedfilesharing app 8 years ago
Lukas Reschke 933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
8 years ago
Joas Schilling 043625ee52 Move findLanguage() and setLanguageFromRequest() to factory 8 years ago
Thomas Müller 682821c71e Happy new year! 8 years ago
Lukas Reschke 574f9b1e3f Use XMLWriter to generate response
Gets rid of manual XML generation.
9 years ago
Roeland Jago Douma 002e9c76cd Combine OCS API getUser method code into provisioning_api app
Fixes #13002

Move the cloud/users/{userid} code in total to the provisioning API.
9 years ago
Morris Jobke 8366ce2767 deduplicate @xenopathic 9 years ago
Morris Jobke b945d71384 update licence headers via script 9 years ago
Robin McCorkell 29dd7d83c4 Check if files_sharing is actually enabled before using it 9 years ago
Thomas Müller 3358db320b Reduce duplicate code 9 years ago
Thomas Müller bacf1603ff Adding ocs/v2.php with status code mapper 9 years ago
Morris Jobke f63915d0c8 update license headers and authors 9 years ago
Joas Schilling 3f3f8c2f99 Fix usage of deprecated private constants 9 years ago
Robin Appelman a7aba07dc1 block ocs in single user mode 9 years ago