Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix(settings): Disable renaming for tokens marked to be wiped #43195

Merged
merged 2 commits into from
Feb 1, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
return array_map(function (IToken $token) use ($sessionToken) {
$data = $token->jsonSerialize();
$data['canDelete'] = true;
$data['canRename'] = $token instanceof INamedToken;
$data['canRename'] = $token instanceof INamedToken && $data['type'] !== IToken::WIPE_TOKEN;

Check notice

Code scanning / Psalm

DeprecatedClass Note

Class OC\Authentication\Token\IToken is deprecated
if ($sessionToken->getId() === $token->getId()) {
$data['canDelete'] = false;
$data['canRename'] = false;
Expand Down
1 change: 1 addition & 0 deletions apps/settings/src/store/authtoken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export const useAuthTokenStore = defineStore('auth-token', {
logger.debug('App token marked for wipe', { token })

token.type = TokenType.WIPING_TOKEN
token.canRename = false // wipe tokens can not be renamed
return true
} catch (error) {
logger.error('Could not wipe app token', { error })
Expand Down
4 changes: 2 additions & 2 deletions dist/core-common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-common.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-vue-settings-personal-security.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-personal-security.js.map

Large diffs are not rendered by default.

Loading