mirror of
https://github.com/ceph/ceph
synced 2025-02-24 03:27:10 +00:00
Merge pull request #43845 from rhcs-dashboard/add-mfa-ids-in-rgw-user-details
mgr/dashboard: include mfa_ids in rgw user-details section Reviewed-by: Alfonso Martínez <almartin@redhat.com> Reviewed-by: Avan Thakkar <athakkar@redhat.com> Reviewed-by: Ernesto Puerta <epuertat@redhat.com> Reviewed-by: Nizamudeen A <nia@redhat.com> Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
This commit is contained in:
commit
fe74cd8c6a
@ -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