diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-03-15 12:51:31 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2024-06-05 19:01:14 +0200 |
commit | f6d6efef3a26fc5524988cdfba780dce035cd61b (patch) | |
tree | ea3caeb6b4a9e10b013eb1562135eb6a1973f607 /lib/private/Template/JSConfigHelper.php | |
parent | 340939e688fab5c52061bc9e358587fbd8ec9fc8 (diff) | |
download | nextcloud-server-f6d6efef3a26fc5524988cdfba780dce035cd61b.tar.gz nextcloud-server-f6d6efef3a26fc5524988cdfba780dce035cd61b.zip |
refactor(Token): introduce scope constants
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Template/JSConfigHelper.php')
-rw-r--r-- | lib/private/Template/JSConfigHelper.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php index 5c38ae4cc72..a41e99ae8c4 100644 --- a/lib/private/Template/JSConfigHelper.php +++ b/lib/private/Template/JSConfigHelper.php @@ -16,6 +16,7 @@ use OCP\App\IAppManager; use OCP\Authentication\Exceptions\ExpiredTokenException; use OCP\Authentication\Exceptions\InvalidTokenException; use OCP\Authentication\Exceptions\WipeTokenException; +use OCP\Authentication\Token\IToken; use OCP\Constants; use OCP\Defaults; use OCP\Files\FileInfo; @@ -286,6 +287,6 @@ class JSConfigHelper { return true; } $scope = $token->getScopeAsArray(); - return !isset($scope['sso-based-login']) || $scope['sso-based-login'] === false; + return !isset($scope[IToken::SCOPE_SKIP_PASSWORD_VALIDATION]) || $scope[IToken::SCOPE_SKIP_PASSWORD_VALIDATION] === false; } } |