aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-02-07 15:57:14 +0100
committerGitHub <noreply@github.com>2019-02-07 15:57:14 +0100
commit0e9903c420aee76648e61c4c14b750ea01125bb1 (patch)
tree4869d5a2df8054b416103855fe951989aaf03afd /core/Controller
parent6dc21fff45abbb2bde2611a82c746f873389bfd7 (diff)
parentb68567e9ba5b4b081378061bf938b5b505638fb3 (diff)
downloadnextcloud-server-0e9903c420aee76648e61c4c14b750ea01125bb1.tar.gz
nextcloud-server-0e9903c420aee76648e61c4c14b750ea01125bb1.zip
Merge pull request #13969 from nextcloud/enh/additional_scripts_no_on_public_pages
No need to emit additonalscript event on public pages
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/ClientFlowLoginController.php16
-rw-r--r--core/Controller/TwoFactorChallengeController.php10
2 files changed, 13 insertions, 13 deletions
diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php
index b58f56194c7..f73e3f260a7 100644
--- a/core/Controller/ClientFlowLoginController.php
+++ b/core/Controller/ClientFlowLoginController.php
@@ -36,7 +36,7 @@ use OCA\OAuth2\Db\ClientMapper;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Response;
-use OCP\AppFramework\Http\TemplateResponse;
+use OCP\AppFramework\Http\StandaloneTemplateResponse;
use OCP\Defaults;
use OCP\IL10N;
use OCP\IRequest;
@@ -131,10 +131,10 @@ class ClientFlowLoginController extends Controller {
}
/**
- * @return TemplateResponse
+ * @return StandaloneTemplateResponse
*/
private function stateTokenForbiddenResponse() {
- $response = new TemplateResponse(
+ $response = new StandaloneTemplateResponse(
$this->appName,
'403',
[
@@ -153,7 +153,7 @@ class ClientFlowLoginController extends Controller {
*
* @param string $clientIdentifier
*
- * @return TemplateResponse
+ * @return StandaloneTemplateResponse
*/
public function showAuthPickerPage($clientIdentifier = '') {
$clientName = $this->getClientName();
@@ -166,7 +166,7 @@ class ClientFlowLoginController extends Controller {
// No valid clientIdentifier given and no valid API Request (APIRequest header not set)
$clientRequest = $this->request->getHeader('OCS-APIREQUEST');
if ($clientRequest !== 'true' && $client === null) {
- return new TemplateResponse(
+ return new StandaloneTemplateResponse(
$this->appName,
'error',
[
@@ -188,7 +188,7 @@ class ClientFlowLoginController extends Controller {
);
$this->session->set(self::stateName, $stateToken);
- return new TemplateResponse(
+ return new StandaloneTemplateResponse(
$this->appName,
'loginflow/authpicker',
[
@@ -212,7 +212,7 @@ class ClientFlowLoginController extends Controller {
*
* @param string $stateToken
* @param string $clientIdentifier
- * @return TemplateResponse
+ * @return StandaloneTemplateResponse
*/
public function grantPage($stateToken = '',
$clientIdentifier = '') {
@@ -227,7 +227,7 @@ class ClientFlowLoginController extends Controller {
$clientName = $client->getName();
}
- return new TemplateResponse(
+ return new StandaloneTemplateResponse(
$this->appName,
'loginflow/grant',
[
diff --git a/core/Controller/TwoFactorChallengeController.php b/core/Controller/TwoFactorChallengeController.php
index 3d14b157f77..7405e66cdfc 100644
--- a/core/Controller/TwoFactorChallengeController.php
+++ b/core/Controller/TwoFactorChallengeController.php
@@ -31,7 +31,7 @@ use OC_User;
use OC_Util;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\RedirectResponse;
-use OCP\AppFramework\Http\TemplateResponse;
+use OCP\AppFramework\Http\StandaloneTemplateResponse;
use OCP\Authentication\TwoFactorAuth\IProvider;
use OCP\Authentication\TwoFactorAuth\IProvidesCustomCSP;
use OCP\Authentication\TwoFactorAuth\TwoFactorException;
@@ -100,7 +100,7 @@ class TwoFactorChallengeController extends Controller {
* @NoCSRFRequired
*
* @param string $redirect_url
- * @return TemplateResponse
+ * @return StandaloneTemplateResponse
*/
public function selectChallenge($redirect_url) {
$user = $this->userSession->getUser();
@@ -115,7 +115,7 @@ class TwoFactorChallengeController extends Controller {
'redirect_url' => $redirect_url,
'logout_url' => $this->getLogoutUrl(),
];
- return new TemplateResponse($this->appName, 'twofactorselectchallenge', $data, 'guest');
+ return new StandaloneTemplateResponse($this->appName, 'twofactorselectchallenge', $data, 'guest');
}
/**
@@ -125,7 +125,7 @@ class TwoFactorChallengeController extends Controller {
*
* @param string $challengeProviderId
* @param string $redirect_url
- * @return TemplateResponse|RedirectResponse
+ * @return StandaloneTemplateResponse|RedirectResponse
*/
public function showChallenge($challengeProviderId, $redirect_url) {
$user = $this->userSession->getUser();
@@ -160,7 +160,7 @@ class TwoFactorChallengeController extends Controller {
'redirect_url' => $redirect_url,
'template' => $tmpl->fetchPage(),
];
- $response = new TemplateResponse($this->appName, 'twofactorshowchallenge', $data, 'guest');
+ $response = new StandaloneTemplateResponse($this->appName, 'twofactorshowchallenge', $data, 'guest');
if ($provider instanceof IProvidesCustomCSP) {
$response->setContentSecurityPolicy($provider->getCSP());
}