Skip to content

Commit

Permalink
includes proposed changes
Browse files Browse the repository at this point in the history
Signed-off-by: jonathanmmm <[email protected]>
  • Loading branch information
jonathanmmm committed May 4, 2022
1 parent f5ac60f commit 285a150
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class Application extends App implements IBootstrap {
'show_labs_settings' => 'true',
'set_custom_permalink' => 'false',
'sso_immediate_redirect' => 'false',
'sso_force_iframe' => 'false',
];

public function __construct(array $urlParams = []) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Controller/AppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public function index() {

$this->initialStateService->provideInitialState(Application::APP_ID, 'disable_custom_urls',
$this->config->getAppValue(Application::APP_ID, 'disable_custom_urls', Application::AvailableSettings['disable_custom_urls']));
$this->initialStateService->provideInitialState(Application::APP_ID, 'sso_force_iframe',
$this->config->getAppValue(Application::APP_ID, 'sso_force_iframe', Application::AvailableSettings['sso_force_iframe']));

$default_server_domain = $this->config->getAppValue(Application::APP_ID, 'base_url', Application::AvailableSettings['base_url']);
$csp = new ContentSecurityPolicy();
Expand Down
13 changes: 13 additions & 0 deletions src/components/AdminSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@
for="sso_immediate_redirect"
>{{ t('riotchat', 'Redirect immediately to SSO (requires SSO to be configured on the Matrix Homeserver)') }}</label>
<br>
<input
id="sso_force_iframe"
v-model="sso_immediate_redirect"
type="checkbox"
class="checkbox"
@change="updateSetting('sso_force_iframe')"
>
<label
ref="sso_force_iframe"
for="sso_force_iframe"
>{{ t('riotchat', 'Force iframe (to use with SSO or CAS set the headers to let it be iframed in nextcloud)') }}</label>
<br>
<input
id="disable_login_language_selector"
v-model="disable_login_language_selector"
Expand Down Expand Up @@ -232,6 +244,7 @@ export default {
"custom_json_loading": false,
"set_custom_permalink": loadState('riotchat', 'set_custom_permalink') === 'true',
"sso_immediate_redirect": loadState('riotchat', 'sso_immediate_redirect') === 'true',
"sso_force_iframe": loadState('riotchat', 'sso_force_iframe') === 'true',
};
},
computed: {
Expand Down

0 comments on commit 285a150

Please sign in to comment.