Skip to content

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

Merged
susnux merged 2 commits into
stable28from
backport/42331/stable28
Feb 1, 2024
Merged

[stable28] fix(settings): Disable renaming for tokens marked to be wiped#43195
susnux merged 2 commits into
stable28from
backport/42331/stable28

Conversation

@backportbot

@backportbotbackportbotBot commented Jan 29, 2024

Copy link
Copy Markdown

Backport of #42331

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Remove all the empty commits

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

This otherwise a WipeException will be thrown when trying to rename
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
$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

Class OC\Authentication\Token\IToken is deprecated
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnuxforce-pushed the backport/42331/stable28 branch from b1a0663 to a61c11fCompareJanuary 29, 2024 21:06
@susnux
susnux marked this pull request as ready for review January 29, 2024 21:14
@susnux
susnux merged commit d501f2d into stable28Feb 1, 2024
@susnux
susnux deleted the backport/42331/stable28 branch February 1, 2024 11:15
@skjnldsvskjnldsv mentioned this pull request Feb 14, 2024
8 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@susnux@github-advanced-security@emoral435