Skip to content

Commit

Permalink
New option to hide account lock status panel
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed Jul 12, 2024
1 parent ca9a14c commit 4a3dcd4
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 11 deletions.
1 change: 1 addition & 0 deletions conf/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
$use_resetpassword = true;
$use_resetpassword_resetchoice = true;
$resetpassword_reset_default = true;
$show_lockstatus = true;
$use_unlockaccount = true;
$use_lockaccount = true;
$use_searchlocked = true;
Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ LDAP Tool Box Service Desk documentation
checkpassword.rst
resetpassword.rst
lockaccount.rst
unlockaccount.rst
hook.rst
dashboards.rst
config_mail.rst
Expand Down
25 changes: 25 additions & 0 deletions docs/lockaccount.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
Lock account
============

Show lock status
----------------

If password policy allows to lock an account, Service Desk will display if account is locked or not.

This panel can be hidden by configuration:

.. code-block:: php
$show_lockstatus = false;
Lock account
------------

This feature allows to lock the account permanently. The button is only displayed if the account is not locked.

To enable this feature:

.. code-block:: php
$use_lockaccount = true;
Unlock account
--------------

This feature allows to unlock the account. It is only displayed if the account is already locked.

To enable this feature:

.. code-block:: php
$use_unlockaccount = true;
10 changes: 0 additions & 10 deletions docs/unlockaccount.rst

This file was deleted.

1 change: 1 addition & 0 deletions htdocs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
$smarty->assign('use_resetpassword',$use_resetpassword);
$smarty->assign('use_resetpassword_resetchoice',$use_resetpassword_resetchoice);
$smarty->assign('resetpassword_reset_default',$resetpassword_reset_default);
$smarty->assign('show_lockstatus',$show_lockstatus);
$smarty->assign('use_unlockaccount',$use_unlockaccount);
$smarty->assign('use_lockaccount',$use_lockaccount);
$smarty->assign('display_password_expiration_date',$display_password_expiration_date);
Expand Down
2 changes: 2 additions & 0 deletions templates/display.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
</div>
{/if}

{if $show_lockstatus}
{if $isLocked}
<div class="card mb-3 shadow border-danger">
<div class="card-header text-bg-danger text-center">
Expand Down Expand Up @@ -245,6 +246,7 @@
{/if}
</div>
{/if}
{/if}

{if $isExpired}
<div class="card mb-3 shadow border-danger">
Expand Down

0 comments on commit 4a3dcd4

Please sign in to comment.