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
44 changes: 44 additions & 0 deletions .nextcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
/AUTHORS.md
/build
/.editorconfig
/.eslintrc.js
/.git
/.github
/.gitignore
/.php*
/.travis.yml
/.tx
/.scrutinizer.yml
/.nextcloudignore
/babel.config.js
/CONTRIBUTING.md
/composer.json
/composer.lock
/composer.phar
/karma.conf.js
/krankerl.toml
/l10n/no-php
/Makefile
/nbproject
/node_modules
/package.json
/package-lock.json
/psalm.xml
/screenshots
/src
/stylelint.config.js
/tests
/vendor/bin
/vendor/**/tests
/webpack.common.js
/webpack.dev.js
/webpack.js
/webpack.prod.js
/vendor/bin
/vendor-bin
/vite.config.ts
/tsconfig.json
/rector.php
/CHANGELOG.md
61 changes: 0 additions & 61 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions krankerl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
[package]
before_cmds = [
"composer install --no-dev -o",
'npm ci',
'npm run build'
]
3 changes: 1 addition & 2 deletions lib/Listener/LoadAdditionalScriptsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public function handle(Event $event): void {
$timezoneDB = $this->userConfig->getValueString($user->getUID(), 'core', 'timezone');

if ($timezoneDB === '' || !$this->session->exists('timezone')) {
Util::addScript('user_saml', 'vendor/jstz.min');
Util::addScript('user_saml', 'timezone');
Util::addScript('user_saml', 'user_saml-timezone');
}
}
}
Binary file modified screenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/timezone.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import logger from './logger.ts'

logger.debug('updating timezone and offset for SAML user')

try {
await axios.post(generateUrl('/apps/user_saml/config/timezone'), {
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
timezoneOffset: String(-new Date().getTimezoneOffset() / 60),
})
logger.info('timezone and offset updated for SAML user')
} catch (error) {
logger.error('could not set timezone and offset for SAML user', { error })
}
4 changes: 2 additions & 2 deletions templates/selectUserBackEnd.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/
use OCP\Util;

Util::addStyle('user_saml', 'selectUserBackEnd');
Util::addScript('user_saml', 'selectUserBackEnd');
Util::addStyle('user_saml', 'user_saml-selectUserBackEnd');
Util::addScript('user_saml', 'user_saml-selectUserBackEnd');

/** @var array $_ */
/** @var \OCP\IL10N $l */
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const isProduction = process.env.NODE_ENV === 'production'
export default createAppConfig({
admin: join(import.meta.dirname, 'src', 'admin.ts'),
selectUserBackEnd: join(import.meta.dirname, 'src', 'selectUserBackEnd.ts'),
timezone: join(import.meta.dirname, 'src', 'timezone.ts'),
}, {
minify: isProduction,
thirdPartyLicense: false,
Expand Down
Loading