[users] fix user view totp delete checks (#9301)

pull/9305/head
Jeroen Pinoy 2023-09-28 11:49:49 +02:00 committed by GitHub
parent 769c6e10c3
commit d684b2e112
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -27,12 +27,12 @@ $totpHtml = $boolean;
$totpHtml .= (!$isTotp && !$admin_view ? $this->Html->link(__('Generate'), array('action' => 'totp_new')) : '');
$totpHtml .= ($isTotp && !$admin_view ? $this->Html->link(__('View paper tokens'), array('action' => 'hotp', $user['User']['id'])): '');
if ($admin_view && $isSiteAdmin && $isTotp) {
if ($isAdmin && $isTotp) {
$totpHtml .= sprintf(
'<a href="#" onClick="openGenericModal(\'%s/users/totp_delete/%s\')">%s</a>',
h($baseurl),
h($user['User']['id']),
__('Delete')
__($isTotp && !$admin_view ? ' Delete' : 'Delete')
);
}
$table_data = [