-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a dedicated menu to list disabled accounts (#125)
- Loading branch information
David Coutadeur
committed
Oct 25, 2024
1 parent
c44b3b8
commit 68d639f
Showing
10 changed files
with
90 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/* | ||
* Search disabled entries in LDAP directory | ||
*/ | ||
|
||
require_once("../conf/config.inc.php"); | ||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
[$ldap,$result,$nb_entries,$entries,$size_limit_reached] = $ldapInstance->search($ldap_user_filter, array(), $attributes_map, $search_result_title, $search_result_sortby, $search_result_items, $ldap_scope); | ||
|
||
if ( !empty($entries) ) | ||
{ | ||
|
||
# Check if entry is still locked | ||
foreach($entries as $entry_key => $entry) { | ||
|
||
$isEnabled = $directory->isAccountEnabled($ldap, $entry['dn']); | ||
|
||
if ( $isEnabled === true ) { | ||
unset($entries[$entry_key]); | ||
$nb_entries--; | ||
} | ||
|
||
} | ||
|
||
$smarty->assign("page_title", "disabledaccounts"); | ||
if ($nb_entries === 0) { | ||
$result = "noentriesfound"; | ||
} else { | ||
$smarty->assign("nb_entries", $nb_entries); | ||
$smarty->assign("entries", $entries); | ||
$smarty->assign("size_limit_reached", $size_limit_reached); | ||
|
||
$columns = $search_result_items; | ||
if (! in_array($search_result_title, $columns)) array_unshift($columns, $search_result_title); | ||
$smarty->assign("listing_columns", $columns); | ||
$smarty->assign("listing_linkto", isset($search_result_linkto) ? $search_result_linkto : array($search_result_title)); | ||
$smarty->assign("listing_sortby", array_search($search_result_sortby, $columns)); | ||
$smarty->assign("show_undef", $search_result_show_undefined); | ||
$smarty->assign("truncate_value_after", $search_result_truncate_value_after); | ||
if ($use_enableaccount) { $smarty->assign("display_enable_button", true); } | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<div class="alert alert-warning"> | ||
{$nb_entries} {if $nb_entries==1}{$msg_entryfound}{else}{$msg_entriesfound}{/if} | ||
</div> | ||
|
||
{if {$size_limit_reached}} | ||
<div class="alert alert-warning"><i class="fa fa-fw fa-exclamation-triangle"></i> {$msg_sizelimit}</div> | ||
{/if} | ||
|
||
<table id="search-listing" class="table table-striped table-hover table-condensed dataTable"> | ||
{include 'listing_table.tpl' display="search"} | ||
</table> |