mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 03:23:19 +00:00
add filter to hide special account in user list (#2522)
This commit is contained in:
@@ -91,6 +91,7 @@ class Manage extends Helper
|
||||
'sbas_id' => $this->request->get('sbas_id'),
|
||||
'base_id' => $this->request->get('base_id'),
|
||||
'last_model' => $this->request->get('last_model'),
|
||||
'show_special_users' => $this->request->get('show_special_users') ? true : false,
|
||||
'srt' => $this->request->get("srt", \User_Query::SORT_CREATIONDATE),
|
||||
'ord' => $this->request->get("ord", \User_Query::ORD_DESC),
|
||||
'per_page' => $results_quantity,
|
||||
@@ -109,6 +110,7 @@ class Manage extends Helper
|
||||
->last_model_is($this->query_parms['last_model'])
|
||||
->get_inactives($this->query_parms['inactives'])
|
||||
->include_templates(true)
|
||||
->include_special_users($this->query_parms['show_special_users'])
|
||||
->on_bases_where_i_am($this->app->getAclForUser($this->app->getAuthenticatedUser()), [\ACL::CANADMIN])
|
||||
->limit($offset_start, $results_quantity)
|
||||
->execute();
|
||||
|
@@ -812,7 +812,7 @@ class User_Query
|
||||
WHERE 1 ';
|
||||
|
||||
if (! $this->include_special_users) {
|
||||
$sql .= ' AND Users.login != "autoregister" AND Users.login != "invite" ';
|
||||
$sql .= ' AND Users.login != "autoregister" AND Users.login NOT LIKE "guest%" ';
|
||||
}
|
||||
|
||||
$sql .= ' AND Users.deleted="0" ';
|
||||
|
@@ -33,7 +33,12 @@
|
||||
|
||||
<form id="users_page_search" method="post" action="{{ path('admin_users_search') }}" target="_self" class="form-inline">
|
||||
<fieldset class="admin_head_opts">
|
||||
<span>{{ 'Filter' | trans }}</span>
|
||||
<span class="checkbox">
|
||||
{{ 'Show special users' | trans }}
|
||||
<input type="checkbox" name="show_special_users" {% if parm['show_special_users'] %} checked="checked" {% endif %} style="margin-left:10px" />
|
||||
</span>
|
||||
<br/>
|
||||
<span>{{ 'Filter' | trans }}</span>
|
||||
<select name="like_field" class="input-medium">
|
||||
<option {% if parm['like_field'] == "login" %}selected="selected"{% endif %} value="login">{{ 'Push::filter on login' | trans }}</option>
|
||||
<option {% if parm['like_field'] == "name" %}selected="selected"{% endif %} value="name">{{ 'First/Last Name' | trans }}</option>
|
||||
|
Reference in New Issue
Block a user