Skip to content

Commit 9fc027b

Browse files
committed
[IM] Update user flags - also closes #932
1 parent 22f9164 commit 9fc027b

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

resources/views/customer/overview-tabs/users.foil.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Last Login
2222
</th>
2323
<th>
24-
2FA Enabled
24+
Flags
2525
</th>
2626
<th>
2727
Actions
@@ -53,7 +53,15 @@
5353
<?= $c2u->last_login_date ?? '<em>Never</em>' ?>
5454
</td>
5555
<td>
56-
<?= $u2fa && $u2fa->enabled ? "Yes" : "No" ?>
56+
<?php if( $u2fa && $u2fa->enabled ): ?>
57+
<span class="badge badge-success">2FA</span>
58+
<?php else: ?>
59+
<span class="badge badge-danger">2FA</span>
60+
<?php endif; ?>
61+
62+
<?php if( config( 'auth.peeringdb.enabled' ) && $user->peeringdb_id ): ?>
63+
<span class="badge badge-info">OAuth</span>
64+
<?php endif; ?>
5765
</td>
5866
<td>
5967
<div class="btn-group btn-group-sm">

resources/views/user/index.foil.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@
9494
<?= \IXP\Models\User::$PRIVILEGES_TEXT_VSHORT[ $u[ "privileges" ] ] ?? 'X' ?>
9595
<?= ( $u[ 'nbC2U' ] > 1 ) ? "*": "" ?>
9696
</td>
97-
<td>
97+
<td data-sort="<?= $u[ 'u2fa_enabled' ] ? 1 : 0 ?>">
9898
<?php if( $u[ 'u2fa_enabled' ] ): ?>
9999
<span class="badge badge-success">2FA</span>
100+
<?php else: ?>
101+
<span class="badge badge-danger">2FA</span>
100102
<?php endif; ?>
101103

102104
<?php if( config( 'auth.peeringdb.enabled' ) && $u['peeringdb_id'] ): ?>
103-
<span class="badge badge-success">OAuth</span>
105+
<span class="badge badge-info">OAuth</span>
104106
<?php endif; ?>
105107
</td>
106108
<td>

0 commit comments

Comments
 (0)