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
Xavier Bachelot
lemonldap-ng
Commits
1de19778
Commit
1de19778
authored
Jan 22, 2019
by
Christophe Maudoux
🐛
Browse files
Display delete button only if allowed (#1622)
parent
36dd0019
Changes
2
Hide whitespace changes
Inline
Side-by-side
lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Engines/Default.pm
View file @
1de19778
...
...
@@ -333,6 +333,7 @@ sub _displayRegister {
}
# Parse second factors to display delete button if allowed
my
$action
=
'';
foreach
(
@$
_2fDevices
)
{
if
(
$_
->
{
type
}
eq
'
U2F
'
)
{
$_
->
{
delAllowed
}
...
...
@@ -352,6 +353,7 @@ sub _displayRegister {
&&
$self
->
conf
->
{
yubikey2fUserCanRemoveKey
}
&&
$self
->
conf
->
{
yubikey2fSelfRegistration
};
}
$action
||=
$_
->
{
delAllowed
};
}
# Display template
...
...
@@ -363,6 +365,7 @@ sub _displayRegister {
SKIN
=>
$self
->
conf
->
{
portalSkin
},
MODULES
=>
\
@am
,
SFDEVICES
=>
$
_2fDevices
,
ACTION
=>
$action
,
REG_REQUIRED
=>
$req
->
data
->
{
sfRegRequired
},
}
);
...
...
lemonldap-ng-portal/site/templates/bootstrap/2fregisters.tpl
View file @
1de19778
...
...
@@ -17,7 +17,10 @@
<th><span
trspan=
"type"
>
Type
</span></th>
<th><span
trspan=
"name"
>
Name
</span></th>
<th><span
trspan=
"date"
>
Date
</span></th>
<th><span
trspan=
"action"
>
Action
</span></th>
<th>
<TMPL_IF
NAME=
"ACTION"
>
<span
trspan=
"action"
>
Action
</span></th>
</TMPL_IF>
</tr>
</thead>
<tbody>
...
...
Write
Preview
Supports
Markdown
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