mirror of
https://github.com/ceph/ceph
synced 2025-02-24 03:27:10 +00:00
mgr/dashboard: include mfa_ids in rgw user-details section
Fixes: https://tracker.ceph.com/issues/53193 Signed-off-by: Avan Thakkar <athakkar@redhat.com> Introducing mfa_ids in user details section.
This commit is contained in:
parent
534fc6d936
commit
6a2234cd6b
@ -68,6 +68,11 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngIf="user.mfa_ids?.length">
|
||||
<td i18n
|
||||
class="bold">MFAs(Id)</td>
|
||||
<td>{{ user.mfa_ids | join}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -71,4 +71,24 @@ describe('RgwUserDetailsComponent', () => {
|
||||
|
||||
expect(detailsTab[11].textContent).toEqual('No');
|
||||
});
|
||||
|
||||
it('should show mfa ids only if length > 0', () => {
|
||||
component.selection = {
|
||||
uid: 'dashboard',
|
||||
email: '',
|
||||
system: 'true',
|
||||
keys: [],
|
||||
swift_keys: [],
|
||||
mfa_ids: ['testMFA1', 'testMFA2']
|
||||
};
|
||||
|
||||
component.ngOnChanges();
|
||||
fixture.detectChanges();
|
||||
|
||||
const detailsTab = fixture.debugElement.nativeElement.querySelectorAll(
|
||||
'.table.table-striped.table-bordered tr td'
|
||||
);
|
||||
expect(detailsTab[14].textContent).toEqual('MFAs(Id)');
|
||||
expect(detailsTab[15].textContent).toEqual('testMFA1, testMFA2');
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user