Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Antoine Rosier
lemonldap-ng
Commits
a853fdea
Commit
a853fdea
authored
Dec 17, 2021
by
Antoine Rosier
Browse files
Improve checkuser template
parent
3096fdaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
lemonldap-ng-portal/site/templates/bootstrap/checkuser.tpl
View file @
a853fdea
...
...
@@ -32,24 +32,65 @@
<TMPL_IF
NAME=
"HEADERS"
>
<div
class=
"row"
>
<div
class=
"card col border-secondary"
>
<div
class=
"text-center bg-light text-dark"
><b><span
trspan=
"headers"
>
HEADERS
</span></b></div>
<div
class=
"font-weight-bold"
>
<TMPL_LOOP
NAME=
"HEADERS"
>
<TMPL_VAR
NAME=
"key"
>
:
<TMPL_VAR
NAME=
"value"
><br/>
</TMPL_LOOP>
<div
class =
"col-12 col-sm-12 col-md-12 pb-3"
>
<div
class=
"card h-100 border-secondary"
>
<div
class=
"card-title text-center bg-light text-dark"
><b><span
trspan=
"headers"
>
HEADERS
</span></b></div>
<div
class=
"card-text font-weight-bold m-2"
>
<TMPL_LOOP
NAME=
"HEADERS"
>
<TMPL_VAR
NAME=
"key"
>
:
<TMPL_VAR
NAME=
"value"
><br/>
</TMPL_LOOP>
</div>
</div>
</div>
</div>
</TMPL_IF>
<div
class=
"row"
>
<TMPL_IF
NAME=
"HISTORY"
>
<div
class=
"card col border-secondary"
>
<div
class=
"text-center bg-light text-dark"
><b><span
trspan=
"loginHistory"
>
HISTORY
</span></b></div>
<TMPL_IF
NAME=
"SUCCESS"
>
<div
class=
"row "
>
<!-- Groups Card 1 -->
<div
class =
"col-6 col-sm-12 col-md-6 p-0"
>
<div
class=
"card h-100"
>
<div
class=
"card-title text-center bg-light text-dark"
><b><span
trspan=
"groups_sso"
>
SSO GROUPS
</span></b></div>
<TMPL_LOOP
NAME=
"GROUPS"
>
<div
class=
"card-text text-left ml-2"
><TMPL_VAR
NAME=
"value"
></div>
</TMPL_LOOP>
</div>
</div>
<!-- Macros Card 2 -->
<div
class =
"col-6 col-sm-12 col-md-6 p-0"
>
<div
class=
"card h-100"
>
<TMPL_IF
NAME=
"MACROS"
>
<div
class=
"card-title text-center bg-light text-dark"
><b><span
trspan=
"macros"
>
MACROS
</span></b></div>
<table
class=
"table table-sm table-hover"
>
<thead>
<tr>
<th
scope=
"col"
><span
trspan=
"key"
>
Key
</span></th>
<th
scope=
"col"
><span
trspan=
"value"
>
Value
</span></th>
</tr>
</thead>
<tbody>
<TMPL_LOOP
NAME=
"MACROS"
>
<tr>
<td
scope=
"row"
><TMPL_VAR
NAME=
"key"
></td>
<td
scope=
"row"
><TMPL_VAR
NAME=
"value"
></td>
</tr>
</TMPL_LOOP>
</tbody>
</table>
</TMPL_IF>
</div>
</div>
<!-- History Card 3 -->
<div
class =
"col-6 col-sm-12 col-md-6 p-0"
>
<div
class=
"card h-100"
>
<TMPL_IF
NAME=
"HISTORY"
>
<div
class=
"card-title text-center bg-light text-dark"
><b><span
trspan=
"loginHistory"
>
HISTORY
</span></b></div>
<TMPL_IF
NAME=
"SUCCESS"
>
<table
class=
"table table-sm table-hover"
>
<thead>
<div
class=
"text-center bg-light text-dark"
><span
trspan=
"lastLogins"
>
Success
</span></div>
<div
class=
"
card-text
text-center bg-light text-dark"
><span
trspan=
"lastLogins"
>
Success
</span></div>
<tr>
<th
scope=
"col"
><span
trspan=
"date"
>
Date
</span></th>
<th
scope=
"col"
><span
trspan=
"value"
>
Value
</span></th>
...
...
@@ -57,18 +98,18 @@
</thead>
<tbody>
<TMPL_LOOP
NAME=
"SUCCESS"
>
<tr>
<td
class=
"localeDate"
scope=
"row"
val=
"<TMPL_VAR NAME="
utime
"
>
">
</td>
<td
scope=
"row"
><TMPL_VAR
NAME=
"values"
></td>
</tr>
</TMPL_LOOP>
<tr>
<td
class=
"localeDate"
scope=
"row"
val=
"<TMPL_VAR NAME="
utime
"
>
">
</td>
<td
scope=
"row"
><TMPL_VAR
NAME=
"values"
></td>
</tr>
</TMPL_LOOP>
</tbody>
</table>
</TMPL_IF>
<TMPL_IF
NAME=
"FAILED"
>
</TMPL_IF>
<TMPL_IF
NAME=
"FAILED"
>
<table
class=
"table table-sm table-hover"
>
<thead>
<div
class=
"text-center bg-light text-dark"
><span
trspan=
"lastFailedLogins"
>
Failed
</span></div>
<div
class=
"
card-text
text-center bg-light text-dark"
><span
trspan=
"lastFailedLogins"
>
Failed
</span></div>
<tr>
<th
scope=
"col"
><span
trspan=
"date"
>
Date
</span></th>
<th
scope=
"col"
><span
trspan=
"value"
>
Value
</span></th>
...
...
@@ -76,32 +117,23 @@
</thead>
<tbody>
<TMPL_LOOP
NAME=
"FAILED"
>
<tr>
<td
class=
"localeDate"
scope=
"row"
val=
"<TMPL_VAR NAME="
utime
"
>
">
</td>
<td
scope=
"row"
><TMPL_VAR
NAME=
"values"
></td>
</tr>
</TMPL_LOOP>
<tr>
<td
class=
"localeDate"
scope=
"row"
val=
"<TMPL_VAR NAME="
utime
"
>
">
</td>
<td
scope=
"row"
><TMPL_VAR
NAME=
"values"
></td>
</tr>
</TMPL_LOOP>
</tbody>
</table>
</TMPL_IF>
</TMPL_IF>
</div>
</TMPL_IF>
<TMPL_IF
NAME=
"GROUPS"
>
<div
class=
"card col border-secondary"
>
<div
class=
"text-center bg-light text-dark"
><b><span
trspan=
"groups_sso"
>
SSO GROUPS
</span></b></div>
<div
class=
"row"
>
<TMPL_LOOP
NAME=
"GROUPS"
>
<div
class=
"w-100"
></div>
<div
class=
"col"
><TMPL_VAR
NAME=
"value"
></div>
</TMPL_LOOP>
</div>
</div>
</TMPL_IF>
<div
class=
"col"
>
<div
class=
"row"
>
<!-- Attribute Card 4 -->
<div
class =
"col-6 col-sm-12 col-md-6 p-0"
>
<div
class=
"card h-100"
>
<TMPL_IF
NAME=
"ATTRIBUTES"
>
<div
class=
"card col border-secondary"
>
<div
class=
"text-center bg-light text-dark"
><b><span
trspan=
"attributes"
>
ATTRIBUTES
</span></b></div>
<div
class=
"card-title text-center bg-light text-dark"
><b><span
trspan=
"attributes"
>
ATTRIBUTES
</span></b></div>
<table
class=
"table table-sm table-hover"
>
<thead>
<tr>
...
...
@@ -118,32 +150,10 @@
</TMPL_LOOP>
</tbody>
</table>
</div>
</TMPL_IF>
<TMPL_IF
NAME=
"GROUPS"
><div
class=
"w-100"
></div></TMPL_IF>
<TMPL_IF
NAME=
"MACROS"
>
<div
class=
"card col border-secondary"
>
<div
class=
"text-center bg-light text-dark"
><b><span
trspan=
"macros"
>
MACROS
</span></b></div>
<table
class=
"table table-sm table-hover"
>
<thead>
<tr>
<th
scope=
"col"
><span
trspan=
"key"
>
Key
</span></th>
<th
scope=
"col"
><span
trspan=
"value"
>
Value
</span></th>
</tr>
</thead>
<tbody>
<TMPL_LOOP
NAME=
"MACROS"
>
<tr>
<td
scope=
"row"
><TMPL_VAR
NAME=
"key"
></td>
<td
scope=
"row"
><TMPL_VAR
NAME=
"value"
></td>
</tr>
</TMPL_LOOP>
</tbody>
</table>
</div>
</TMPL_IF>
</div>
</div>
</div>
<div
class=
"buttons"
>
...
...
lemonldap-ng-portal/t/67-CheckUser-with-Global-token.t
View file @
a853fdea
...
...
@@ -166,7 +166,7 @@ ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' )
or
explain
(
$res
->
[
2
]
->
[
0
],
'
Header Key: Auth-User
'
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%: rtyler<br/>%
,
'
Found rtyler
'
)
or
explain
(
$res
->
[
2
]
->
[
0
],
'
Header Value: rtyler
'
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%<div class="c
ol
">su</div>%
,
'
Found su
'
)
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%<div class="c
ard-text text-left ml-2
">su</div>%
,
'
Found su
'
)
or
explain
(
$res
->
[
2
]
->
[
0
],
'
SSO Groups: su
'
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%<td scope="row">uid</td>%
,
'
Found uid
'
)
or
explain
(
$res
->
[
2
]
->
[
0
],
'
Attribute Value uid
'
);
...
...
lemonldap-ng-portal/t/67-CheckUser.t
View file @
a853fdea
...
...
@@ -429,7 +429,7 @@ ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' )
or
explain
(
$res
->
[
2
]
->
[
0
],
'
Header Key: Auth-User
'
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%: rtyler<br/>%
,
'
Found rtyler
'
)
or
explain
(
$res
->
[
2
]
->
[
0
],
'
Header Value: rtyler
'
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%<div class="c
ol
">su</div>%
,
'
Found su
'
)
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%<div class="c
ard-text text-left ml-2
">su</div>%
,
'
Found su
'
)
or
explain
(
$res
->
[
2
]
->
[
0
],
'
SSO Groups: su
'
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%<td scope="row">uid</td>%
,
'
Found uid
'
)
or
explain
(
$res
->
[
2
]
->
[
0
],
'
Attribute Value uid
'
);
...
...
@@ -489,7 +489,7 @@ ok( $res->[2]->[0] =~ m%Auth-User: %, 'Found Auth-User' )
or
explain
(
$res
->
[
2
]
->
[
0
],
'
Header Key: Auth-User
'
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%: rtyler<br/>%
,
'
Found rtyler
'
)
or
explain
(
$res
->
[
2
]
->
[
0
],
'
Header Value: rtyler
'
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%<div class="c
ol
">su</div>%
,
'
Found su
'
)
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%<div class="c
ard-text text-left ml-2
">su</div>%
,
'
Found su
'
)
or
explain
(
$res
->
[
2
]
->
[
0
],
'
SSO Groups: su
'
);
ok
(
$res
->
[
2
]
->
[
0
]
=~
m%<td scope="row">uid</td>%
,
'
Found uid
'
)
or
explain
(
$res
->
[
2
]
->
[
0
],
'
Attribute Value uid
'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment