mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(Token): add FILESYSTEM scope with SCOPE_SKIP_PASSWORD_VALIDATION
The scope design requires scopes to be either not specified, or specified explicitely. Therefore, when setting the skip-password-validation scope for user authentication from mechanisms like SAML, we also have to set the filesystem scope, otherwise they will lack access to the filesystem. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
5afec6cd31
commit
bea11a744f
1 changed files with 4 additions and 1 deletions
|
|
@ -197,7 +197,10 @@ class OC_User {
|
|||
if (empty($password)) {
|
||||
$tokenProvider = \OC::$server->get(IProvider::class);
|
||||
$token = $tokenProvider->getToken($userSession->getSession()->getId());
|
||||
$token->setScope(['password-unconfirmable' => true]);
|
||||
$token->setScope([
|
||||
'password-unconfirmable' => true,
|
||||
'filesystem' => true,
|
||||
]);
|
||||
$tokenProvider->updateToken($token);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue