Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/settings/lib/Controller/AdminSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @author Christoph Wurst <[email protected]>
* @author Lukas Reschke <[email protected]>
* @author Robin Appelman <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
Expand All @@ -27,6 +28,7 @@

use OC\AppFramework\Middleware\Security\Exceptions\NotAdminException;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\Group\ISubAdmin;
use OCP\IGroupManager;
Expand All @@ -37,6 +39,7 @@
use OCP\Settings\IManager as ISettingsManager;
use OCP\Template;

#[IgnoreOpenAPI]
class AdminSettingsController extends Controller {
use CommonSettingsTrait;

Expand Down
3 changes: 3 additions & 0 deletions apps/settings/lib/Controller/AppSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @author Morris Jobke <[email protected]>
* @author Roeland Jago Douma <[email protected]>
* @author Thomas Müller <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license AGPL-3.0
*
Expand Down Expand Up @@ -42,6 +43,7 @@
use OCP\App\IAppManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\TemplateResponse;
Expand All @@ -53,6 +55,7 @@
use OCP\L10N\IFactory;
use Psr\Log\LoggerInterface;

#[IgnoreOpenAPI]
class AppSettingsController extends Controller {

/** @var \OCP\IL10N */
Expand Down
3 changes: 3 additions & 0 deletions apps/settings/lib/Controller/CheckSetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* @author Timo Förster <[email protected]>
* @author Valdnet <[email protected]>
* @author MichaIng <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license AGPL-3.0
*
Expand Down Expand Up @@ -69,6 +70,7 @@
use OCA\Settings\SetupChecks\SupportedDatabase;
use OCP\App\IAppManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\DataDisplayResponse;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\RedirectResponse;
Expand All @@ -89,6 +91,7 @@
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\GenericEvent;

#[IgnoreOpenAPI]
class CheckSetupController extends Controller {
/** @var IConfig */
private $config;
Expand Down
3 changes: 3 additions & 0 deletions apps/settings/lib/Controller/HelpController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @author Joas Schilling <[email protected]>
* @author Julius Härtl <[email protected]>
* @author Roeland Jago Douma <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
Expand All @@ -30,6 +31,7 @@
namespace OCA\Settings\Controller;

use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IGroupManager;
Expand All @@ -38,6 +40,7 @@
use OCP\IRequest;
use OCP\IURLGenerator;

#[IgnoreOpenAPI]
class HelpController extends Controller {

/** @var INavigationManager */
Expand Down
12 changes: 9 additions & 3 deletions apps/settings/lib/Controller/LogSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @author Lukas Reschke <[email protected]>
* @author Roeland Jago Douma <[email protected]>
* @author Thomas Müller <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license AGPL-3.0
*
Expand All @@ -28,6 +29,7 @@

use OC\Log;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\StreamResponse;
use OCP\IRequest;

Expand All @@ -46,15 +48,19 @@ public function __construct(string $appName, IRequest $request, Log $logger) {
*
* @NoCSRFRequired
*
* @return StreamResponse
* @psalm-suppress MoreSpecificReturnType The value of Content-Disposition is not relevant
* @psalm-suppress LessSpecificReturnStatement The value of Content-Disposition is not relevant
* @return StreamResponse<Http::STATUS_OK, array{Content-Type: 'application/octet-stream', 'Content-Disposition': string}>
*/
public function download() {
if (!$this->log instanceof Log) {
throw new \UnexpectedValueException('Log file not available');
}
$resp = new StreamResponse($this->log->getLogPath());
$resp->addHeader('Content-Type', 'application/octet-stream');
$resp->addHeader('Content-Disposition', 'attachment; filename="nextcloud.log"');
$resp->setHeaders([
'Content-Type' => 'application/octet-stream',
'Content-Disposition' => 'attachment; filename="nextcloud.log"',
]);
return $resp;
}
}
3 changes: 3 additions & 0 deletions apps/settings/lib/Controller/PersonalSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @author Christoph Wurst <[email protected]>
* @author Joas Schilling <[email protected]>
* @author Robin Appelman <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
Expand All @@ -26,6 +27,7 @@
namespace OCA\Settings\Controller;

use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\Group\ISubAdmin;
use OCP\IGroupManager;
Expand All @@ -35,6 +37,7 @@
use OCP\Settings\IManager as ISettingsManager;
use OCP\Template;

#[IgnoreOpenAPI]
class PersonalSettingsController extends Controller {
use CommonSettingsTrait;

Expand Down
3 changes: 3 additions & 0 deletions apps/settings/lib/Controller/ReasonsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @copyright Copyright (c) 2020, Roeland Jago Douma <[email protected]>
*
* @author Jan C. Borchardt <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
Expand All @@ -26,8 +27,10 @@
namespace OCA\Settings\Controller;

use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\DataDisplayResponse;

#[IgnoreOpenAPI]
class ReasonsController extends Controller {

/**
Expand Down
3 changes: 3 additions & 0 deletions apps/settings/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @author Morris Jobke <[email protected]>
* @author Roeland Jago Douma <[email protected]>
* @author Vincent Petry <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license AGPL-3.0
*
Expand Down Expand Up @@ -54,6 +55,7 @@
use OCP\Accounts\PropertyDoesNotExistException;
use OCP\App\IAppManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\TemplateResponse;
Expand All @@ -71,6 +73,7 @@
use OCP\Mail\IMailer;
use function in_array;

#[IgnoreOpenAPI]
class UsersController extends Controller {
/** @var UserManager */
private $userManager;
Expand Down
3 changes: 3 additions & 0 deletions apps/settings/lib/Controller/WebAuthnController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*
* @author Joas Schilling <[email protected]>
* @author Roeland Jago Douma <[email protected]>
* @author Kate Döen <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
Expand All @@ -30,13 +31,15 @@
use OCA\Settings\AppInfo\Application;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\JSONResponse;
use OCP\ILogger;
use OCP\IRequest;
use OCP\ISession;
use OCP\IUserSession;
use Webauthn\PublicKeyCredentialCreationOptions;

#[IgnoreOpenAPI]
class WebAuthnController extends Controller {
private const WEBAUTHN_REGISTRATION = 'webauthn_registration';

Expand Down
2 changes: 1 addition & 1 deletion apps/settings/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"scheme": "bearer"
}
},
"schemas": []
"schemas": {}
},
"paths": {
"/index.php/settings/admin/log/download": {
Expand Down