Update website
This commit is contained in:
parent
0a686aeb9a
commit
c4ffa0f6ee
4360 changed files with 1727 additions and 718385 deletions
|
@ -1,38 +0,0 @@
|
|||
<h2>
|
||||
{{ get_icon('b_usradd') }}
|
||||
{% trans 'Add user account' %}
|
||||
</h2>
|
||||
|
||||
<form name="usersForm" id="addUsersForm" action="{{ url('/server/privileges') }}" method="post" autocomplete="off">
|
||||
{{ get_hidden_inputs() }}
|
||||
|
||||
{{ login_information_fields_new|raw }}
|
||||
|
||||
<fieldset class="pma-fieldset" id="fieldset_add_user_database">
|
||||
<legend>{% trans 'Database for user account' %}</legend>
|
||||
|
||||
<input type="checkbox" name="createdb-1" id="createdb-1">
|
||||
<label for="createdb-1">{% trans 'Create database with same name and grant all privileges.' %}</label>
|
||||
<br>
|
||||
|
||||
<input type="checkbox" name="createdb-2" id="createdb-2">
|
||||
<label for="createdb-2">{% trans 'Grant all privileges on wildcard name (username\\_%).' %}</label>
|
||||
<br>
|
||||
|
||||
{% if database is not empty %}
|
||||
<input type="checkbox" name="createdb-3" id="createdb-3" checked>
|
||||
<label for="createdb-3">{{ 'Grant all privileges on database %s.'|trans|format(database) }}</label>
|
||||
<input type="hidden" name="dbname" value="{{ database }}">
|
||||
<br>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
|
||||
{% if is_grant_user %}
|
||||
{{ privileges_table|raw }}
|
||||
{% endif %}
|
||||
|
||||
<fieldset id="fieldset_add_user_footer" class="pma-fieldset tblFooters">
|
||||
<input type="hidden" name="adduser_submit" value="1">
|
||||
<input class="btn btn-primary" type="submit" id="adduser_submit" value="{% trans 'Go' %}">
|
||||
</fieldset>
|
||||
</form>
|
|
@ -1,12 +0,0 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<fieldset class="pma-fieldset" id="fieldset_add_user">
|
||||
<legend>{% trans %}New{% context %}Create new user{% endtrans %}</legend>
|
||||
<a id="add_user_anchor" href="{{ url('/server/privileges', url_params) }}"
|
||||
{% if rel_params is not empty %}
|
||||
rel="{{ get_common(rel_params) }}"
|
||||
{% endif %}>
|
||||
{{ get_icon('b_usradd') }}{% trans 'Add user account' %}</a>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
|
@ -1,72 +0,0 @@
|
|||
<form method="post" id="change_password_form" action="
|
||||
{{- is_privileges ? url('/server/privileges') : url('/user-password') }}" name="chgPassword" class="{{ is_privileges ? 'submenu-item' }}" autocomplete="off">
|
||||
{{ get_hidden_inputs() }}
|
||||
{% if is_privileges %}
|
||||
<input type="hidden" name="username" value="{{ username }}">
|
||||
<input type="hidden" name="hostname" value="{{ hostname }}">
|
||||
{% endif %}
|
||||
|
||||
<fieldset class="pma-fieldset" id="fieldset_change_password">
|
||||
<legend{{ is_privileges ? ' data-submenu-label="Change password"' }}>{% trans 'Change password' %}</legend>
|
||||
<table class="table table-borderless w-auto">
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="radio" name="nopass" value="1" id="nopass_1">
|
||||
<label for="nopass_1">{% trans 'No Password' %}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="align-middle">
|
||||
<td>
|
||||
<input type="radio" name="nopass" value="0" id="nopass_0" checked="checked">
|
||||
<label for="nopass_0">{% trans 'Password:' %} </label>
|
||||
</td>
|
||||
<td>
|
||||
{% trans 'Enter:' %}
|
||||
<input type="password" spellcheck="false" name="pma_pw" id="text_pma_change_pw" size="10" class="textfield"
|
||||
onkeyup="Functions.checkPasswordStrength($(this).val(), $('#change_password_strength_meter'), meter_obj_label = $('#change_password_strength'), CommonParams.get('user'));"
|
||||
onchange="nopass[1].checked = true">
|
||||
<span>{% trans %}Strength:{% context %}Password strength{% endtrans %}</span>
|
||||
<meter max="4" id="change_password_strength_meter" name="pw_meter"></meter>
|
||||
<span id="change_password_strength" name="pw_strength"></span>
|
||||
<br>
|
||||
{% trans 'Re-type:' %}
|
||||
<input type="password" spellcheck="false" name="pma_pw2" id="text_pma_change_pw2" size="10" class="textfield" onchange="nopass[1].checked = true">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% if not is_new or (is_new and has_more_auth_plugins) %}
|
||||
<tr class="align-middle">
|
||||
<td>
|
||||
<label for="select_authentication_plugin_cp">{% trans 'Password Hashing:' %}</label>
|
||||
</td>
|
||||
<td>
|
||||
<select name="authentication_plugin" id="select_authentication_plugin_cp">
|
||||
{% for plugin_name, plugin_description in active_auth_plugins %}
|
||||
<option value="{{ plugin_name }}"{{ plugin_name == orig_auth_plugin ? ' selected' }}>{{ plugin_description }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<tr id="tr_element_before_generate_password"></tr>
|
||||
</table>
|
||||
|
||||
{% if is_new and has_more_auth_plugins %}
|
||||
<div{{ orig_auth_plugin != 'sha256_password' ? ' class="hide"' }} id="ssl_reqd_warning_cp">
|
||||
{% apply notice %}
|
||||
{% trans %}
|
||||
This method requires using an '<i>SSL connection</i>' or an '<i>unencrypted connection that encrypts the password using RSA</i>'; while connecting to the server.
|
||||
{% endtrans %}
|
||||
{{ show_mysql_docu('sha256-authentication-plugin') }}
|
||||
{% endapply %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset_change_password_footer" class="pma-fieldset tblFooters">
|
||||
<input type="hidden" name="change_pw" value="1">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
|
||||
</fieldset>
|
||||
</form>
|
|
@ -1,12 +0,0 @@
|
|||
<form class="ajax" id="changeUserGroupForm" action="{{ url('/server/privileges') }}" method="post">
|
||||
{{ get_hidden_inputs(params) }}
|
||||
<input type="hidden" name="changeUserGroup" value="1">
|
||||
|
||||
<label class="form-label" for="userGroupSelect">{% trans 'User group:' %}</label>
|
||||
<select class="form-select" name="userGroup" id="userGroupSelect">
|
||||
<option value=""></option>
|
||||
{% for option in all_user_groups %}
|
||||
<option value="{{ option }}"{{ user_group == option ? ' selected' }}>{{ option }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</form>
|
|
@ -1,105 +0,0 @@
|
|||
<div id="edit_user_dialog">
|
||||
<h2>
|
||||
{{ get_icon('b_usredit') }}
|
||||
{% trans 'Edit privileges:' %}
|
||||
{% trans 'User account' %}
|
||||
<em>
|
||||
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
|
||||
'username': username,
|
||||
'hostname': hostname,
|
||||
'dbname': '',
|
||||
'tablename': ''
|
||||
}) }}">
|
||||
'{{ username }}'@'{{ hostname }}'
|
||||
</a>
|
||||
</em>
|
||||
-
|
||||
{% trans 'Database' %}
|
||||
<em>
|
||||
<a href="{{ url('/server/privileges', {
|
||||
'username': username,
|
||||
'hostname': hostname,
|
||||
'dbname': dbname,
|
||||
'routinename': ''
|
||||
}) }}">
|
||||
{{ database }}
|
||||
</a>
|
||||
</em>
|
||||
-
|
||||
{% trans 'Routine' %}
|
||||
<em>{{ routine }}</em>
|
||||
</h2>
|
||||
|
||||
{% if current_user == username ~ '@' ~ hostname %}
|
||||
{{ 'Note: You are attempting to edit privileges of the user with which you are currently logged in.'|trans|notice }}
|
||||
{% endif %}
|
||||
|
||||
<form class="submenu-item" name="usersForm" id="addUsersForm" action="{{ url('/server/privileges') }}" method="post">
|
||||
{{ get_hidden_inputs() }}
|
||||
<input type="hidden" name="username" value="{{ username }}">
|
||||
<input type="hidden" name="hostname" value="{{ hostname }}">
|
||||
<input type="hidden" name="dbname" value="{{ database }}">
|
||||
<input type="hidden" name="routinename" value="{{ routine }}">
|
||||
<input type="hidden" name="grant_count" value="{{ privileges|length }}">
|
||||
|
||||
<fieldset class="pma-fieldset" id="fieldset_user_global_rights">
|
||||
<legend data-submenu-label="{% trans 'Routine' %}">
|
||||
{% trans 'Routine-specific privileges' %}
|
||||
</legend>
|
||||
<p>
|
||||
<small>
|
||||
<em>{% trans 'Note: MySQL privilege names are expressed in English.' %}</em>
|
||||
</small>
|
||||
</p>
|
||||
|
||||
<fieldset class="pma-fieldset">
|
||||
<legend>
|
||||
<input type="checkbox" class="sub_checkall_box" id="checkall_Routine_priv" title="{% trans 'Check all' %}">
|
||||
<label for="checkall_Routine_priv">{% trans 'Routine' %}</label>
|
||||
</legend>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" class="checkall" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
|
||||
{%- trans 'Allows user to give to other users or remove from other users privileges that user possess on this routine.' %}"
|
||||
{{- privileges['Grant_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Grant_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows user to give to other users or remove from other users privileges that user possess on this routine.' %}">
|
||||
GRANT
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" class="checkall" name="Alter_routine_priv" id="checkbox_Alter_routine_priv" value="Y" title="
|
||||
{%- trans 'Allows altering and dropping this routine.' %}"{{ privileges['Alter_routine_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Alter_routine_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows altering and dropping this routine.' %}">
|
||||
ALTER ROUTINE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" class="checkall" name="Execute_priv" id="checkbox_Execute_priv" value="Y" title="
|
||||
{%- trans 'Allows executing this routine.' %}"{{ privileges['Execute_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Execute_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows executing this routine.' %}">
|
||||
EXECUTE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset_user_privtable_footer" class="pma-fieldset tblFooters">
|
||||
<input type="hidden" name="update_privs" value="1">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
|
@ -1,11 +0,0 @@
|
|||
<a
|
||||
{% if link_class is not same as ('') %}
|
||||
class="{{ link_class }}"
|
||||
{% endif %}
|
||||
href="{{ url('/server/privileges', is_revoke ? [] : url_params) }}"
|
||||
{% if is_revoke %}
|
||||
data-post="{{ get_common(url_params, '') }}"
|
||||
{% endif %}
|
||||
>
|
||||
{{ get_icon(action.icon, action.text) }}
|
||||
</a>
|
|
@ -1,20 +0,0 @@
|
|||
<nav aria-label="{% trans 'Pagination of user accounts' %}">
|
||||
<ul id="userAccountsPagination" class="pagination">
|
||||
{% for tmp_initial, initial_was_found in array_initials %}
|
||||
{% if tmp_initial is not same as(null) %}
|
||||
{% if initial_was_found %}
|
||||
<li class="page-item{{ initial is same as(tmp_initial) ? ' active' }}"{{ initial is same as(tmp_initial) ? ' aria-current="page"' }}>
|
||||
<a class="page-link" href="{{ url('/server/privileges', {'viewing_mode': viewing_mode, 'initial': tmp_initial}) }}">{{ tmp_initial }}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<a class="page-link" href="#" tabindex="-1" aria-disabled="true">{{ tmp_initial }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<li class="page-item">
|
||||
<a class="page-link text-nowrap" href="{{ url('/server/privileges', {'viewing_mode': viewing_mode, 'showall': true}) }}">{% trans 'Show all' %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
|
@ -1,91 +0,0 @@
|
|||
<fieldset class="pma-fieldset" id="fieldset_add_user_login">
|
||||
<legend>{% trans 'Login Information' %}</legend>
|
||||
<div class="item">
|
||||
<label for="select_pred_username">{% trans 'User name:' %}</label>
|
||||
<span class="options">
|
||||
<select name="pred_username" id="select_pred_username" title="{% trans 'User name' %}">
|
||||
<option value="any"{{ pred_username == 'any' ? ' selected' }}>{% trans 'Any user' %}</option>
|
||||
<option value="userdefined"{{ pred_username is null or pred_username == 'userdefined' ? ' selected' }}>{% trans 'Use text field' %}</option>
|
||||
</select>
|
||||
</span>
|
||||
<input type="text" name="username" id="pma_username" class="autofocus" spellcheck="false" maxlength="{{ username_length }}" title="{% trans 'User name' %}"
|
||||
{%- if username is not empty %} value="{{ new_username is not null ? new_username : username }}"{% endif -%}
|
||||
{{- pred_username is null or pred_username == 'userdefined' ? ' required' }}>
|
||||
|
||||
<div id="user_exists_warning" class="hide">
|
||||
{{ 'An account already exists with the same username but possibly a different hostname.'|trans|notice }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<label for="select_pred_hostname">
|
||||
{% trans 'Host name:' %}
|
||||
</label>
|
||||
<span class="options">
|
||||
<select name="pred_hostname" id="select_pred_hostname" title="{% trans 'Host name' %}"
|
||||
{{- this_host is not null and this_host != 'localhost' and this_host != '127.0.0.1' ? ' data-thishost="' ~ this_host ~ '"' }}>
|
||||
<option value="any"{{ pred_hostname == 'any' ? ' selected' }}>{% trans 'Any host' %}</option>
|
||||
<option value="localhost"{{ pred_hostname == 'localhost' ? ' selected' }}>{% trans 'Local' %}</option>
|
||||
{% if this_host is not empty %}
|
||||
<option value="thishost"{{ pred_hostname == 'thishost' ? ' selected' }}>{% trans 'This host' %}</option>
|
||||
{% endif %}
|
||||
<option value="hosttable"{{ pred_hostname == 'hosttable' ? ' selected' }}>{% trans 'Use host table' %}</option>
|
||||
<option value="userdefined"{{ pred_hostname == 'userdefined' ? ' selected' }}>{% trans 'Use text field' %}</option>
|
||||
</select>
|
||||
</span>
|
||||
<input type="text" name="hostname" id="pma_hostname" maxlength="{{ hostname_length }}" value="{{ hostname|default('%') }}" title="
|
||||
{%- trans 'Host name' %}"{{ pred_hostname == 'userdefined' ? ' required' }}>
|
||||
|
||||
{{ show_hint('When Host table is used, this field is ignored and values stored in Host table are used instead.'|trans) }}
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<label for="select_pred_password">{% trans 'Password:' %}</label>
|
||||
<span class="options">
|
||||
<select name="pred_password" id="select_pred_password" title="{% trans 'Password' %}">
|
||||
{% if is_change %}
|
||||
<option value="keep" selected>{% trans 'Do not change the password' %}</option>
|
||||
{% endif %}
|
||||
<option value="none"{{ username is not null and not is_change ? ' selected' }}>{% trans 'No password' %}</option>
|
||||
<option value="userdefined"{{ username is null ? ' selected' }}>{% trans 'Use text field' %}</option>
|
||||
</select>
|
||||
</span>
|
||||
<input type="password" spellcheck="false" id="text_pma_pw" name="pma_pw" title="{% trans 'Password' %}"{{ username is null ? ' required' }}>
|
||||
<span>{% trans %}Strength:{% context %}Password strength{% endtrans %}</span>
|
||||
<meter max="4" id="password_strength_meter" name="pw_meter"></meter>
|
||||
<span id="password_strength" name="pw_strength"></span>
|
||||
</div>
|
||||
|
||||
<div class="item" id="div_element_before_generate_password">
|
||||
<label for="text_pma_pw2">{% trans 'Re-type:' %}</label>
|
||||
<span class="options"> </span>
|
||||
<input type="password" spellcheck="false" name="pma_pw2" id="text_pma_pw2" title="{% trans 'Re-type' %}"{{ username is null ? ' required' }}>
|
||||
</div>
|
||||
|
||||
<div class="item" id="authentication_plugin_div">
|
||||
<label for="select_authentication_plugin">
|
||||
{% if is_new %}
|
||||
{% trans 'Authentication plugin' %}
|
||||
{% else %}
|
||||
{% trans 'Password hashing method' %}
|
||||
{% endif %}
|
||||
</label>
|
||||
<span class="options"> </span>
|
||||
|
||||
<select name="authentication_plugin" id="select_authentication_plugin">
|
||||
{% for plugin_name, plugin_description in active_auth_plugins %}
|
||||
<option value="{{ plugin_name }}"{{ plugin_name == auth_plugin ? ' selected' }}>{{ plugin_description }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<div id="ssl_reqd_warning"{{ auth_plugin != 'sha256_password' ? ' class="hide"' }}>
|
||||
{% apply notice %}
|
||||
{% trans %}
|
||||
This method requires using an '<em>SSL connection</em>' or an '<em>unencrypted connection that encrypts the password using RSA</em>'; while connecting to the server.
|
||||
{% endtrans %}
|
||||
{{ show_mysql_docu('sha256-authentication-plugin') }}
|
||||
{% endapply %}
|
||||
</div>
|
||||
</div>
|
||||
{# Generate password added here via jQuery #}
|
||||
</fieldset>
|
|
@ -1,66 +0,0 @@
|
|||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="selected_usr[]" id="checkbox_sel_users_" value="
|
||||
{{- user.name ~ '&#27;' ~ user.host }}">
|
||||
</td>
|
||||
<td>
|
||||
<label for="checkbox_sel_users_">
|
||||
{% if user.name is empty %}
|
||||
<span class="text-danger">{% trans 'Any' %}</span>
|
||||
{% else %}
|
||||
{{ user.name }}
|
||||
{% endif %}
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
{{ user.host }}
|
||||
</td>
|
||||
<td>
|
||||
{% if user.has_password %}
|
||||
{% trans 'Yes' %}
|
||||
{% else %}
|
||||
<span class="text-danger">{% trans 'No' %}</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<code>
|
||||
{{ user.privileges|raw }}
|
||||
</code>
|
||||
</td>
|
||||
{% if user.has_group %}
|
||||
<td class="usrGroup"></td>
|
||||
{% endif %}
|
||||
<td>
|
||||
{{ user.has_grant ? 'Yes'|trans : 'No'|trans }}
|
||||
</td>
|
||||
{% if is_grantuser %}
|
||||
<td>
|
||||
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
|
||||
'username': user.name,
|
||||
'hostname': user.host,
|
||||
'dbname': '',
|
||||
'tablename': '',
|
||||
'routinename': ''
|
||||
}) }}">
|
||||
{{ get_icon('b_usredit', 'Edit privileges'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if user.has_group_edit %}
|
||||
<td>
|
||||
<button type="button" class="btn btn-link p-0" data-bs-toggle="modal" data-bs-target="#editUserGroupModal" data-username="{{ user.name }}">
|
||||
{{ get_icon('b_usrlist', 'Edit user group'|trans) }}
|
||||
</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<a class="export_user_anchor ajax" href="{{ url('/server/privileges', {
|
||||
'username': user.name,
|
||||
'hostname': user.host,
|
||||
'export': true,
|
||||
'initial': initial
|
||||
}) }}">
|
||||
{{ get_icon('b_tblexport', 'Export'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
|
@ -1,104 +0,0 @@
|
|||
<form class="submenu-item" action="{{ url('/server/privileges') }}" id="{{ form_id }}" method="post">
|
||||
{{ get_hidden_inputs() }}
|
||||
<input type="hidden" name="username" value="{{ username }}">
|
||||
<input type="hidden" name="hostname" value="{{ hostname }}">
|
||||
|
||||
<fieldset class="pma-fieldset">
|
||||
<legend data-submenu-label="{{ sub_menu_label }}">
|
||||
{{ legend }}
|
||||
</legend>
|
||||
|
||||
<table class="table table-striped table-hover w-auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{{ type_label }}</th>
|
||||
<th scope="col">{% trans 'Privileges' %}</th>
|
||||
<th scope="col">{% trans 'Grant' %}</th>
|
||||
{% if type == 'database' %}
|
||||
<th scope="col">{% trans 'Table-specific privileges' %}</th>
|
||||
{% elseif type == 'table' %}
|
||||
<th scope="col">{% trans 'Column-specific privileges' %}</th>
|
||||
{% endif %}
|
||||
<th scope="col" colspan="2">{% trans 'Action' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% if privileges|length == 0 %}
|
||||
{% set colspan = type == 'database' ? 7 : (type == 'table' ? 6 : 5) %}
|
||||
<tr>
|
||||
<td class="text-center" colspan="{{ colspan }}"><em>{% trans 'None' %}</em></td>
|
||||
</tr>
|
||||
{% else %}
|
||||
{% for privilege in privileges %}
|
||||
<tr>
|
||||
<td>{{ privilege['name'] }}</td>
|
||||
<td><code>{{ privilege['privileges']|raw }}</code></td>
|
||||
<td>{{ privilege['grant'] ? 'Yes'|trans : 'No'|trans }}</td>
|
||||
|
||||
{% if type == 'database' %}
|
||||
<td>{{ privilege['table_privs'] ? 'Yes'|trans : 'No'|trans }}</td>
|
||||
{% elseif type == 'table' %}
|
||||
<td>{{ privilege['column_privs'] ? 'Yes'|trans : 'No'|trans }}</td>
|
||||
{% endif %}
|
||||
|
||||
<td>{{ privilege['edit_link']|raw }}</td>
|
||||
<td>{{ privilege['revoke_link']|raw }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if type == 'database' %}
|
||||
<label for="text_dbname">{% trans 'Add privileges on the following database(s):' %}</label>
|
||||
|
||||
{%- if databases is not empty %}
|
||||
<select class="resize-vertical" name="pred_dbname[]" multiple="multiple">
|
||||
{% for database in databases %}
|
||||
<option value="{{ escaped_databases[loop.index0] }}">
|
||||
{{ database }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endif -%}
|
||||
|
||||
<input type="text" id="text_dbname" name="dbname">
|
||||
{{ show_hint("Wildcards % and _ should be escaped with a \\ to use them literally."|trans) }}
|
||||
{% elseif type == 'table' %}
|
||||
<input type="hidden" name="dbname" value="{{ database|escape_mysql_wildcards }}">
|
||||
|
||||
<label for="text_tablename">{% trans 'Add privileges on the following table:' %}</label>
|
||||
|
||||
{%- if tables is not empty %}
|
||||
<select name="pred_tablename" class="autosubmit">
|
||||
<option value="" selected="selected">{% trans 'Use text field' %}:</option>
|
||||
{% for table in tables %}
|
||||
<option value="{{ table }}">{{ table }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endif -%}
|
||||
|
||||
<input type="text" id="text_tablename" name="tablename">
|
||||
{% else %}
|
||||
<input type="hidden" name="dbname" value="{{ database|escape_mysql_wildcards }}">
|
||||
|
||||
<label for="text_routinename">{% trans 'Add privileges on the following routine:' %}</label>
|
||||
|
||||
{%- if routines is not empty %}
|
||||
<select name="pred_routinename" class="autosubmit">
|
||||
<option value="" selected="selected">{% trans 'Use text field' %}:</option>
|
||||
{% for routine in routines %}
|
||||
<option value="{{ routine }}">{{ routine }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endif -%}
|
||||
|
||||
<input type="text" id="text_routinename" name="routinename">
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="pma-fieldset tblFooters">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
|
||||
</fieldset>
|
||||
</form>
|
|
@ -1,860 +0,0 @@
|
|||
{% if columns is not empty %}
|
||||
|
||||
<input type="hidden" name="grant_count" value="{{ row|length }}">
|
||||
<input type="hidden" name="column_count" value="{{ columns|length }}">
|
||||
<fieldset class="pma-fieldset" id="fieldset_user_priv">
|
||||
<legend data-submenu-label="{% trans 'Table' %}">
|
||||
{% trans 'Table-specific privileges' %}
|
||||
</legend>
|
||||
<p>
|
||||
<small><em>{% trans 'Note: MySQL privilege names are expressed in English.' %}</em></small>
|
||||
</p>
|
||||
|
||||
<div class="item" id="div_item_select">
|
||||
<label for="select_select_priv">
|
||||
<code><dfn title="{% trans 'Allows reading data.' %}">SELECT</dfn></code>
|
||||
</label>
|
||||
|
||||
<select class="resize-vertical" id="select_select_priv" name="Select_priv[]" size="8" multiple>
|
||||
{% for curr_col, curr_col_privs in columns %}
|
||||
<option value="{{ curr_col }}"{{ row['Select_priv'] == 'Y' or curr_col_privs['Select'] ? ' selected' }}>
|
||||
{{ curr_col }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-link p-0" id="select_priv_all" type="button" data-select-target="#select_select_priv">
|
||||
{% trans 'Select all' %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<em>{% trans 'Or' %}</em>
|
||||
<label for="checkbox_Select_priv_none">
|
||||
<input type="checkbox" name="Select_priv_none" id="checkbox_Select_priv_none" title="
|
||||
{%- trans %}None{% context %}None privileges{% endtrans %}">
|
||||
{% trans %}None{% context %}None privileges{% endtrans %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item" id="div_item_insert">
|
||||
<label for="select_insert_priv">
|
||||
<code><dfn title="{% trans 'Allows inserting and replacing data.' %}">INSERT</dfn></code>
|
||||
</label>
|
||||
|
||||
<select class="resize-vertical" id="select_insert_priv" name="Insert_priv[]" size="8" multiple>
|
||||
{% for curr_col, curr_col_privs in columns %}
|
||||
<option value="{{ curr_col }}"{{ row['Insert_priv'] == 'Y' or curr_col_privs['Insert'] ? ' selected' }}>
|
||||
{{ curr_col }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-link p-0" id="insert_priv_all" type="button" data-select-target="#select_insert_priv">
|
||||
{% trans 'Select all' %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<em>{% trans 'Or' %}</em>
|
||||
<label for="checkbox_Insert_priv_none">
|
||||
<input type="checkbox" name="Insert_priv_none" id="checkbox_Insert_priv_none" title="
|
||||
{%- trans %}None{% context %}None privileges{% endtrans %}">
|
||||
{% trans %}None{% context %}None privileges{% endtrans %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item" id="div_item_update">
|
||||
<label for="select_update_priv">
|
||||
<code><dfn title="{% trans 'Allows changing data.' %}">UPDATE</dfn></code>
|
||||
</label>
|
||||
|
||||
<select class="resize-vertical" id="select_update_priv" name="Update_priv[]" size="8" multiple>
|
||||
{% for curr_col, curr_col_privs in columns %}
|
||||
<option value="{{ curr_col }}"{{ row['Update_priv'] == 'Y' or curr_col_privs['Update'] ? ' selected' }}>
|
||||
{{ curr_col }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-link p-0" id="update_priv_all" type="button" data-select-target="#select_update_priv">
|
||||
{% trans 'Select all' %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<em>{% trans 'Or' %}</em>
|
||||
<label for="checkbox_Update_priv_none">
|
||||
<input type="checkbox" name="Update_priv_none" id="checkbox_Update_priv_none" title="
|
||||
{%- trans %}None{% context %}None privileges{% endtrans %}">
|
||||
{% trans %}None{% context %}None privileges{% endtrans %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item" id="div_item_references">
|
||||
<label for="select_references_priv">
|
||||
<code><dfn title="{% trans 'Has no effect in this MySQL version.' %}">REFERENCES</dfn></code>
|
||||
</label>
|
||||
|
||||
<select class="resize-vertical" id="select_references_priv" name="References_priv[]" size="8" multiple>
|
||||
{% for curr_col, curr_col_privs in columns %}
|
||||
<option value="{{ curr_col }}"{{ row['References_priv'] == 'Y' or curr_col_privs['References'] ? ' selected' }}>
|
||||
{{ curr_col }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-link p-0" id="references_priv_all" type="button" data-select-target="#select_references_priv">
|
||||
{% trans 'Select all' %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<em>{% trans 'Or' %}</em>
|
||||
<label for="checkbox_References_priv_none">
|
||||
<input type="checkbox" name="References_priv_none" id="checkbox_References_priv_none" title="
|
||||
{%- trans %}None{% context %}None privileges{% endtrans %}">
|
||||
{% trans %}None{% context %}None privileges{% endtrans %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<div class="item">
|
||||
<input type="checkbox" name="Delete_priv" id="checkbox_Delete_priv" value="Y" title="
|
||||
{%- trans 'Allows deleting data.' %}"{{ row['Delete_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Delete_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows deleting data.' %}">
|
||||
DELETE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" name="Create_priv" id="checkbox_Create_priv" value="Y" title="
|
||||
{%- trans 'Allows creating new tables.' %}"{{ row['Create_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Create_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating new tables.' %}">
|
||||
CREATE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" name="Drop_priv" id="checkbox_Drop_priv" value="Y" title="
|
||||
{%- trans 'Allows dropping tables.' %}"{{ row['Drop_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Drop_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows dropping tables.' %}">
|
||||
DROP
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
|
||||
{%- trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}"
|
||||
{{- row['Grant_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Grant_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}">
|
||||
GRANT
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" name="Index_priv" id="checkbox_Index_priv" value="Y" title="
|
||||
{%- trans 'Allows creating and dropping indexes.' %}"{{ row['Index_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Index_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating and dropping indexes.' %}">
|
||||
INDEX
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" name="Alter_priv" id="checkbox_Alter_priv" value="Y" title="
|
||||
{%- trans 'Allows altering the structure of existing tables.' %}"{{ row['Alter_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Alter_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows altering the structure of existing tables.' %}">
|
||||
ALTER
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" name="Create_view_priv" id="checkbox_Create_view_priv" value="Y" title="
|
||||
{%- trans 'Allows creating new views.' %}"{{ row['Create View_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Create_view_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating new views.' %}">
|
||||
CREATE VIEW
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" name="Show_view_priv" id="checkbox_Show_view_priv" value="Y" title="
|
||||
{%- trans 'Allows performing SHOW CREATE VIEW queries.' %}"{{ row['Show view_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Show_view_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows performing SHOW CREATE VIEW queries.' %}">
|
||||
SHOW VIEW
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="checkbox" name="Trigger_priv" id="checkbox_Trigger_priv" value="Y" title="
|
||||
{%- trans 'Allows creating and dropping triggers.' %}"{{ row['Trigger_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Trigger_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating and dropping triggers.' %}">
|
||||
TRIGGER
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{% if row['Delete versioning rows_priv'] is defined or row['Delete_history_priv'] is defined %}
|
||||
<div class="item">
|
||||
<input type="checkbox" name="Delete_history_priv" id="checkbox_Delete_history_priv" value="Y" title="
|
||||
{%- trans 'Allows deleting historical rows.' %}"
|
||||
{{- row['Delete versioning rows_priv'] == 'Y' or row['Delete_history_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Delete_history_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows deleting historical rows.' %}">
|
||||
DELETE HISTORY
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="clearfloat"></div>
|
||||
</fieldset>
|
||||
|
||||
{% else %}
|
||||
|
||||
{% set grant_count = 0 %}
|
||||
<fieldset class="pma-fieldset" id="fieldset_user_global_rights">
|
||||
<legend data-submenu-label="
|
||||
{%- if is_global %}
|
||||
{%- trans 'Global' -%}
|
||||
{% elseif is_database %}
|
||||
{%- trans 'Database' -%}
|
||||
{% else %}
|
||||
{%- trans 'Table' -%}
|
||||
{% endif %}">
|
||||
{% if is_global %}
|
||||
{% trans 'Global privileges' %}
|
||||
{% elseif is_database %}
|
||||
{% trans 'Database-specific privileges' %}
|
||||
{% else %}
|
||||
{% trans 'Table-specific privileges' %}
|
||||
{% endif %}
|
||||
<input type="checkbox" id="addUsersForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
|
||||
<label for="addUsersForm_checkall">{% trans 'Check all' %}</label>
|
||||
</legend>
|
||||
<p>
|
||||
<small><em>{% trans 'Note: MySQL privilege names are expressed in English.' %}</em></small>
|
||||
</p>
|
||||
|
||||
<fieldset class="pma-fieldset">
|
||||
<legend>
|
||||
<input type="checkbox" class="sub_checkall_box" id="checkall_Data_priv" title="{% trans 'Check all' %}">
|
||||
<label for="checkall_Data_priv">{% trans 'Data' %}</label>
|
||||
</legend>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Select_priv" id="checkbox_Select_priv" value="Y" title="
|
||||
{%- trans 'Allows reading data.' %}"{{ row['Select_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Select_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows reading data.' %}">
|
||||
SELECT
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Insert_priv" id="checkbox_Insert_priv" value="Y" title="
|
||||
{%- trans 'Allows inserting and replacing data.' %}"{{ row['Insert_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Insert_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows inserting and replacing data.' %}">
|
||||
INSERT
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Update_priv" id="checkbox_Update_priv" value="Y" title="
|
||||
{%- trans 'Allows changing data.' %}"{{ row['Update_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Update_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows changing data.' %}">
|
||||
UPDATE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Delete_priv" id="checkbox_Delete_priv" value="Y" title="
|
||||
{%- trans 'Allows deleting data.' %}"{{ row['Delete_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Delete_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows deleting data.' %}">
|
||||
DELETE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{% if is_global %}
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="File_priv" id="checkbox_File_priv" value="Y" title="
|
||||
{%- trans 'Allows importing data from and exporting data into files.' %}"{{ row['File_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_File_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows importing data from and exporting data into files.' %}">
|
||||
FILE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="pma-fieldset">
|
||||
<legend>
|
||||
<input type="checkbox" class="sub_checkall_box" id="checkall_Structure_priv" title="{% trans 'Check all' %}">
|
||||
<label for="checkall_Structure_priv">{% trans 'Structure' %}</label>
|
||||
</legend>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Create_priv" id="checkbox_Create_priv" value="Y" title="
|
||||
{%- if is_database %}
|
||||
{%- trans 'Allows creating new databases and tables.' -%}
|
||||
{% else %}
|
||||
{%- trans 'Allows creating new tables.' -%}
|
||||
{% endif %}"{{ row['Create_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Create_priv">
|
||||
<code>
|
||||
<dfn title="
|
||||
{%- if is_database %}
|
||||
{%- trans 'Allows creating new databases and tables.' -%}
|
||||
{% else %}
|
||||
{%- trans 'Allows creating new tables.' -%}
|
||||
{% endif %}">
|
||||
CREATE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Alter_priv" id="checkbox_Alter_priv" value="Y" title="
|
||||
{%- trans 'Allows altering the structure of existing tables.' %}"{{ row['Alter_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Alter_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows altering the structure of existing tables.' %}">
|
||||
ALTER
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Index_priv" id="checkbox_Index_priv" value="Y" title="
|
||||
{%- trans 'Allows creating and dropping indexes.' %}"{{ row['Index_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Index_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating and dropping indexes.' %}">
|
||||
INDEX
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Drop_priv" id="checkbox_Drop_priv" value="Y" title="
|
||||
{%- if is_database %}
|
||||
{%- trans 'Allows dropping databases and tables.' -%}
|
||||
{% else %}
|
||||
{%- trans 'Allows dropping tables.' -%}
|
||||
{% endif %}"{{ row['Drop_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Drop_priv">
|
||||
<code>
|
||||
<dfn title="
|
||||
{%- if is_database %}
|
||||
{%- trans 'Allows dropping databases and tables.' -%}
|
||||
{% else %}
|
||||
{%- trans 'Allows dropping tables.' -%}
|
||||
{% endif %}">
|
||||
DROP
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Create_tmp_table_priv" id="checkbox_Create_tmp_table_priv" value="Y" title="
|
||||
{%- trans 'Allows creating temporary tables.' %}"{{ row['Create_tmp_table_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Create_tmp_table_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating temporary tables.' %}">
|
||||
CREATE TEMPORARY TABLES
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Show_view_priv" id="checkbox_Show_view_priv" value="Y" title="
|
||||
{%- trans 'Allows performing SHOW CREATE VIEW queries.' %}"{{ row['Show_view_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Show_view_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows performing SHOW CREATE VIEW queries.' %}">
|
||||
SHOW VIEW
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Create_routine_priv" id="checkbox_Create_routine_priv" value="Y" title="
|
||||
{%- trans 'Allows creating stored routines.' %}"{{ row['Create_routine_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Create_routine_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating stored routines.' %}">
|
||||
CREATE ROUTINE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Alter_routine_priv" id="checkbox_Alter_routine_priv" value="Y" title="
|
||||
{%- trans 'Allows altering and dropping stored routines.' %}"{{ row['Alter_routine_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Alter_routine_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows altering and dropping stored routines.' %}">
|
||||
ALTER ROUTINE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Execute_priv" id="checkbox_Execute_priv" value="Y" title="
|
||||
{%- trans 'Allows executing stored routines.' %}"{{ row['Execute_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Execute_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows executing stored routines.' %}">
|
||||
EXECUTE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{% if row['Create_view_priv'] is defined %}
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Create_view_priv" id="checkbox_Create_view_priv" value="Y" title="
|
||||
{%- trans 'Allows creating new views.' %}"{{ row['Create_view_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Create_view_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating new views.' %}">
|
||||
CREATE VIEW
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if row['Create View_priv'] is defined %}
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Create View_priv" id="checkbox_Create View_priv" value="Y" title="
|
||||
{%- trans 'Allows creating new views.' %}"{{ row['Create View_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Create View_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating new views.' %}">
|
||||
CREATE VIEW
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if row['Event_priv'] is defined %}
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Event_priv" id="checkbox_Event_priv" value="Y" title="
|
||||
{%- trans 'Allows to set up events for the event scheduler.' %}"{{ row['Event_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Event_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows to set up events for the event scheduler.' %}">
|
||||
EVENT
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Trigger_priv" id="checkbox_Trigger_priv" value="Y" title="
|
||||
{%- trans 'Allows creating and dropping triggers.' %}"{{ row['Trigger_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Trigger_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating and dropping triggers.' %}">
|
||||
TRIGGER
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="pma-fieldset">
|
||||
<legend>
|
||||
<input type="checkbox" class="sub_checkall_box" id="checkall_Administration_priv" title="{% trans 'Check all' %}">
|
||||
<label for="checkall_Administration_priv">{% trans 'Administration' %}</label>
|
||||
</legend>
|
||||
|
||||
{% if is_global %}
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
|
||||
{%- trans 'Allows adding users and privileges without reloading the privilege tables.' %}"{{ row['Grant_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Grant_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows adding users and privileges without reloading the privilege tables.' %}">
|
||||
GRANT
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Super_priv" id="checkbox_Super_priv" value="Y" title="
|
||||
{%- trans 'Allows connecting, even if maximum number of connections is reached; required for most administrative operations like setting global variables or killing threads of other users.' %}"
|
||||
{{- row['Super_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Super_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows connecting, even if maximum number of connections is reached; required for most administrative operations like setting global variables or killing threads of other users.' %}">
|
||||
SUPER
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Process_priv" id="checkbox_Process_priv" value="Y" title="
|
||||
{%- trans 'Allows viewing processes of all users.' %}"{{ row['Process_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Process_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows viewing processes of all users.' %}">
|
||||
PROCESS
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Reload_priv" id="checkbox_Reload_priv" value="Y" title="
|
||||
{%- trans 'Allows reloading server settings and flushing the server\'s caches.' %}"{{ row['Reload_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Reload_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows reloading server settings and flushing the server\'s caches.' %}">
|
||||
RELOAD
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Shutdown_priv" id="checkbox_Shutdown_priv" value="Y" title="
|
||||
{%- trans 'Allows shutting down the server.' %}"{{ row['Shutdown_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Shutdown_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows shutting down the server.' %}">
|
||||
SHUTDOWN
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Show_db_priv" id="checkbox_Show_db_priv" value="Y" title="
|
||||
{%- trans 'Gives access to the complete list of databases.' %}"{{ row['Show_db_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Show_db_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Gives access to the complete list of databases.' %}">
|
||||
SHOW DATABASES
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
|
||||
{%- trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}"
|
||||
{{- row['Grant_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Grant_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}">
|
||||
GRANT
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Lock_tables_priv" id="checkbox_Lock_tables_priv" value="Y" title="
|
||||
{%- trans 'Allows locking tables for the current thread.' %}"{{ row['Lock_tables_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Lock_tables_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows locking tables for the current thread.' %}">
|
||||
LOCK TABLES
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="References_priv" id="checkbox_References_priv" value="Y" title="
|
||||
{%- trans 'Has no effect in this MySQL version.' %}"{{ row['References_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_References_priv">
|
||||
<code>
|
||||
{# l10n: The "REFERENCES" privilege when granting privileges #}
|
||||
<dfn title="{{ supports_references_privilege ? 'Allows creating foreign key relations.'|trans : (is_mariadb ? 'Not used on MariaDB.'|trans: 'Not used for this MySQL version.'|trans) }}">
|
||||
REFERENCES
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{% if is_global %}
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Repl_client_priv" id="checkbox_Repl_client_priv" value="Y" title="
|
||||
{%- trans 'Allows the user to ask where the replicas / primaries are.' %}"{{ row['Repl_client_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Repl_client_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows the user to ask where the replicas / primaries are.' %}">
|
||||
REPLICATION CLIENT
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Repl_slave_priv" id="checkbox_Repl_slave_priv" value="Y" title="
|
||||
{%- trans 'Needed for the replication replicas.' %}"{{ row['Repl_slave_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Repl_slave_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Needed for the replication replicas.' %}">
|
||||
REPLICATION SLAVE
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
{% set grant_count = grant_count + 1 %}
|
||||
<input type="checkbox" class="checkall" name="Create_user_priv" id="checkbox_Create_user_priv" value="Y" title="
|
||||
{%- trans 'Allows creating, dropping and renaming user accounts.' %}"{{ row['Create_user_priv'] == 'Y' ? ' checked' }}>
|
||||
<label for="checkbox_Create_user_priv">
|
||||
<code>
|
||||
<dfn title="{% trans 'Allows creating, dropping and renaming user accounts.' %}">
|
||||
CREATE USER
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
|
||||
{% if is_global %}
|
||||
<fieldset class="pma-fieldset">
|
||||
<legend>{% trans 'Resource limits' %}</legend>
|
||||
<p>
|
||||
<small><em>{% trans 'Note: Setting these options to 0 (zero) removes the limit.' %}</em></small>
|
||||
</p>
|
||||
|
||||
<div class="item">
|
||||
<label for="text_max_questions">
|
||||
<code>
|
||||
<dfn title="{% trans 'Limits the number of queries the user may send to the server per hour.' %}">
|
||||
MAX QUERIES PER HOUR
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
<input type="number" name="max_questions" id="text_max_questions" value="
|
||||
{{- row.max_questions ?? '0' }}" title="
|
||||
{%- trans 'Limits the number of queries the user may send to the server per hour.' %}">
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<label for="text_max_updates">
|
||||
<code>
|
||||
<dfn title="{% trans 'Limits the number of commands that change any table or database the user may execute per hour.' %}">
|
||||
MAX UPDATES PER HOUR
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
<input type="number" name="max_updates" id="text_max_updates" value="
|
||||
{{- row.max_updates ?? '0' }}" title="
|
||||
{%- trans 'Limits the number of commands that change any table or database the user may execute per hour.' %}">
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<label for="text_max_connections">
|
||||
<code>
|
||||
<dfn title="{% trans 'Limits the number of new connections the user may open per hour.' %}">
|
||||
MAX CONNECTIONS PER HOUR
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
<input type="number" name="max_connections" id="text_max_connections" value="
|
||||
{{- row.max_connections ?? '0' }}" title="
|
||||
{%- trans 'Limits the number of new connections the user may open per hour.' %}">
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<label for="text_max_user_connections">
|
||||
<code>
|
||||
<dfn title="{% trans 'Limits the number of simultaneous connections the user may have.' %}">
|
||||
MAX USER_CONNECTIONS
|
||||
</dfn>
|
||||
</code>
|
||||
</label>
|
||||
<input type="number" name="max_user_connections" id="text_max_user_connections" value="
|
||||
{{- row.max_user_connections ?? '0' }}" title="
|
||||
{%- trans 'Limits the number of simultaneous connections the user may have.' %}">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="pma-fieldset">
|
||||
<legend>SSL</legend>
|
||||
<div id="require_ssl_div">
|
||||
<div class="item">
|
||||
<input type="radio" name="ssl_type" id="ssl_type_NONE" title="
|
||||
{%- trans 'Does not require SSL-encrypted connections.' %}" value="NONE"
|
||||
{{- row.ssl_type == 'NONE' or row.ssl_type == '' ? ' checked' }}>
|
||||
<label for="ssl_type_NONE">
|
||||
<code>REQUIRE NONE</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="radio" name="ssl_type" id="ssl_type_ANY" title="
|
||||
{%- trans 'Requires SSL-encrypted connections.' %}" value="ANY"
|
||||
{{- row.ssl_type == 'ANY' ? ' checked' }}>
|
||||
<label for="ssl_type_ANY">
|
||||
<code>REQUIRE SSL</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="radio" name="ssl_type" id="ssl_type_X509" title="
|
||||
{%- trans 'Requires a valid X509 certificate.' %}" value="X509"
|
||||
{{- row.ssl_type == 'X509' ? ' checked' }}>
|
||||
<label for="ssl_type_X509">
|
||||
<code>REQUIRE X509</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<input type="radio" name="ssl_type" id="ssl_type_SPECIFIED" value="SPECIFIED"
|
||||
{{- row.ssl_type == 'SPECIFIED' ? ' checked' }}>
|
||||
<label for="ssl_type_SPECIFIED">
|
||||
<code>SPECIFIED</code>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="specified_div" style="padding-left:20px;">
|
||||
<div class="item">
|
||||
<label for="text_ssl_cipher">
|
||||
<code>REQUIRE CIPHER</code>
|
||||
</label>
|
||||
<input type="text" name="ssl_cipher" id="text_ssl_cipher" value="{{ row.ssl_cipher }}" size="80" title="
|
||||
{%- trans 'Requires that a specific cipher method be used for a connection.' %}"
|
||||
{{- row.ssl_type != 'SPECIFIED' ? ' disabled' }}>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<label for="text_x509_issuer">
|
||||
<code>REQUIRE ISSUER</code>
|
||||
</label>
|
||||
<input type="text" name="x509_issuer" id="text_x509_issuer" value="{{ row.x509_issuer }}" size="80" title="
|
||||
{%- trans 'Requires that a valid X509 certificate issued by this CA be presented.' %}"
|
||||
{{- row.ssl_type != 'SPECIFIED' ? ' disabled' }}>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<label for="text_x509_subject">
|
||||
<code>REQUIRE SUBJECT</code>
|
||||
</label>
|
||||
<input type="text" name="x509_subject" id="text_x509_subject" value="{{ row.x509_subject }}" size="80" title="
|
||||
{%- trans 'Requires that a valid X509 certificate with this subject be presented.' %}"
|
||||
{{- row.ssl_type != 'SPECIFIED' ? ' disabled' }}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
<div class="clearfloat"></div>
|
||||
</fieldset>
|
||||
<input type="hidden" name="grant_count" value="{{ grant_count - (row['Grant_priv'] is defined ? 1 : 0) }}">
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if has_submit %}
|
||||
<fieldset id="fieldset_user_privtable_footer" class="pma-fieldset tblFooters">
|
||||
<input type="hidden" name="update_privs" value="1">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
|
||||
</fieldset>
|
||||
{% endif %}
|
|
@ -1,16 +0,0 @@
|
|||
<div class="row">
|
||||
<ul class="nav nav-pills m-2">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{{ active == 'privileges' ? ' active' }}" href="{{ url('/server/privileges', {'viewing_mode': 'server'}) }}">
|
||||
{% trans 'User accounts overview' %}
|
||||
</a>
|
||||
</li>
|
||||
{% if is_super_user %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{{ active == 'user-groups' ? ' active' }}" href="{{ url('/server/user-groups') }}">
|
||||
{% trans 'User groups' %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
|
@ -1,31 +0,0 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>
|
||||
{{ get_icon('b_usrlist') }}
|
||||
{% trans 'User accounts overview' %}
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ error_messages|raw }}
|
||||
|
||||
{{ empty_user_notice|raw }}
|
||||
|
||||
{{ initials|raw }}
|
||||
|
||||
{% if users_overview is not empty %}
|
||||
{{ users_overview|raw }}
|
||||
{% elseif is_createuser %}
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<fieldset class="pma-fieldset" id="fieldset_add_user">
|
||||
<legend>{% trans %}New{% context %}Create new user{% endtrans %}</legend>
|
||||
<a id="add_user_anchor" href="{{ url('/server/privileges', {'adduser': true}) }}">
|
||||
{{ get_icon('b_usradd', 'Add user account'|trans) }}
|
||||
</a>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ flush_notice|raw }}
|
|
@ -1,152 +0,0 @@
|
|||
<div id="edit_user_dialog">
|
||||
<h2>
|
||||
{{ get_icon('b_usredit') }}
|
||||
{% trans 'Edit privileges:' %}
|
||||
{% trans 'User account' %}
|
||||
|
||||
{% if database is not empty %}
|
||||
<em>
|
||||
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
|
||||
'username': username,
|
||||
'hostname': hostname,
|
||||
'dbname': '',
|
||||
'tablename': ''
|
||||
}) }}">
|
||||
'{{ username }}'@'{{ hostname }}'
|
||||
</a>
|
||||
</em>
|
||||
-
|
||||
{% if is_databases %}
|
||||
{% trans 'Databases' %}
|
||||
{% else %}
|
||||
{% trans 'Database' %}
|
||||
{% endif %}
|
||||
|
||||
{% if table is not empty %}
|
||||
<em>
|
||||
<a href="{{ url('/server/privileges', {
|
||||
'username': username,
|
||||
'hostname': hostname,
|
||||
'dbname': dbname,
|
||||
'tablename': ''
|
||||
}) }}">
|
||||
{{ database }}
|
||||
</a>
|
||||
</em>
|
||||
-
|
||||
{% trans 'Table' %}
|
||||
<em>{{ table }}</em>
|
||||
{% else %}
|
||||
{% if database is not iterable %}
|
||||
{% set database = [database] %}
|
||||
{% endif %}
|
||||
<em>
|
||||
{{ database|join(', ') }}
|
||||
</em>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<em>'{{ username }}'@'{{ hostname }}'</em>
|
||||
{% endif %}
|
||||
</h2>
|
||||
|
||||
{% if current_user == username ~ '@' ~ hostname %}
|
||||
{{ 'Note: You are attempting to edit privileges of the user with which you are currently logged in.'|trans|notice }}
|
||||
{% endif %}
|
||||
|
||||
{% if user_does_not_exists %}
|
||||
{{ 'The selected user was not found in the privilege table.'|trans|error }}
|
||||
{{ login_information_fields|raw }}
|
||||
{% endif %}
|
||||
|
||||
<form class="submenu-item" name="usersForm" id="addUsersForm" action="{{ url('/server/privileges') }}" method="post">
|
||||
{{ get_hidden_inputs(params) }}
|
||||
|
||||
{{ privileges_table|raw }}
|
||||
</form>
|
||||
|
||||
{{ table_specific_rights|raw }}
|
||||
|
||||
{% if database is not iterable and database|length > 0 and not is_wildcard %}
|
||||
[
|
||||
{% trans 'Database' %}
|
||||
<a href="{{ database_url|raw }}{{ get_common({
|
||||
'db': database|replace({'\\_': '_', '\\%': '%'}),
|
||||
'reload': true
|
||||
}, '&') }}">
|
||||
{{ database|replace({'\\_': '_', '\\%': '%'}) }}:
|
||||
{{ database_url_title }}
|
||||
</a>
|
||||
]
|
||||
{% if table|length > 0 %}
|
||||
[
|
||||
{% trans 'Table' %}
|
||||
<a href="{{ table_url|raw }}{{ get_common({
|
||||
'db': database|replace({'\\_': '_', '\\%': '%'}),
|
||||
'table': table,
|
||||
'reload': true
|
||||
}, '&') }}">
|
||||
{{ table }}:
|
||||
{{ table_url_title }}
|
||||
</a>
|
||||
]
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{{ change_password|raw }}
|
||||
|
||||
<form action="{{ url('/server/privileges') }}" id="copyUserForm" method="post" class="copyUserForm submenu-item" autocomplete="off">
|
||||
{{ get_hidden_inputs() }}
|
||||
<input type="hidden" name="old_username" value="{{ username }}">
|
||||
<input type="hidden" name="old_hostname" value="{{ hostname }}">
|
||||
{% if user_group is not empty %}
|
||||
<input type="hidden" name="old_usergroup" value="{{ user_group }}">
|
||||
{% endif %}
|
||||
|
||||
<fieldset class="pma-fieldset" id="fieldset_change_copy_user">
|
||||
<legend data-submenu-label="{% trans 'Login Information' %}">
|
||||
{% trans 'Change login information / Copy user account' %}
|
||||
</legend>
|
||||
|
||||
{{ change_login_info_fields|raw }}
|
||||
|
||||
<fieldset class="pma-fieldset" id="fieldset_mode">
|
||||
<legend>
|
||||
{% trans 'Create a new user account with the same privileges and …' %}
|
||||
</legend>
|
||||
|
||||
<div class="mb-3 form-check">
|
||||
<input class="form-check-input" type="radio" name="mode" id="mode_4" value="4" checked>
|
||||
<label class="form-check-label" for="mode_4">
|
||||
{% trans '… keep the old one.' %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 form-check">
|
||||
<input class="form-check-input" type="radio" name="mode" id="mode_1" value="1">
|
||||
<label class="form-check-label" for="mode_1">
|
||||
{% trans '… delete the old one from the user tables.' %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 form-check">
|
||||
<input class="form-check-input" type="radio" name="mode" id="mode_2" value="2">
|
||||
<label class="form-check-label" for="mode_2">
|
||||
{% trans '… revoke all active privileges from the old one and delete it afterwards.' %}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 form-check">
|
||||
<input class="form-check-input" type="radio" name="mode" id="mode_3" value="3">
|
||||
<label class="form-check-label" for="mode_3">
|
||||
{% trans '… delete the old one from the user tables and reload the privileges afterwards.' %}
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="fieldset_change_copy_user_footer" class="pma-fieldset tblFooters">
|
||||
<input type="hidden" name="change_copy" value="1">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
|
@ -1,182 +0,0 @@
|
|||
<form name="usersForm" id="usersForm" action="{{ url('/server/privileges') }}" method="post">
|
||||
{{ get_hidden_inputs() }}
|
||||
<div class="table-responsive">
|
||||
<table id="userRightsTable" class="table table-striped table-hover w-auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th scope="col">{% trans 'User name' %}</th>
|
||||
<th scope="col">{% trans 'Host name' %}</th>
|
||||
<th scope="col">{% trans 'Password' %}</th>
|
||||
<th scope="col">
|
||||
{% trans 'Global privileges' %}
|
||||
{{ show_hint('Note: MySQL privilege names are expressed in English.') }}
|
||||
</th>
|
||||
{% if menus_work %}
|
||||
<th scope="col">{% trans 'User group' %}</th>
|
||||
{% endif %}
|
||||
<th scope="col">{% trans 'Grant' %}</th>
|
||||
{%- set action_colspan = 2 %}
|
||||
{%- if user_group_count > 0 %}{% set action_colspan = action_colspan + 1 %}{% endif %}
|
||||
{%- if has_account_locking %}{% set action_colspan = action_colspan + 1 %}{% endif %}
|
||||
<th scope="col" colspan="{{ action_colspan }}">{% trans 'Action' %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for host in hosts %}
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="checkall" id="checkbox_sel_users_{{ loop.index }}" value="
|
||||
{{- host.user ~ '&#27;' ~ host.host }}" name="selected_usr[]">
|
||||
</td>
|
||||
<td>
|
||||
<label for="checkbox_sel_users_{{ loop.index }}">
|
||||
{% if host.user is empty %}
|
||||
<span class="text-danger">{% trans 'Any' %}</span>
|
||||
{% else %}
|
||||
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
|
||||
'username': host.user,
|
||||
'hostname': host.host,
|
||||
'dbname': '',
|
||||
'tablename': '',
|
||||
'routinename': '',
|
||||
}) }}">
|
||||
{{ host.user }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</label>
|
||||
</td>
|
||||
<td>{{ host.host }}</td>
|
||||
<td>
|
||||
{% if host.has_password %}
|
||||
{% trans 'Yes' %}
|
||||
{% else %}
|
||||
<span class="text-danger">{% trans 'No' %}</span>
|
||||
{% endif %}
|
||||
{{ not host.has_select_priv ? show_hint('The selected user was not found in the privilege table.'|trans) }}
|
||||
</td>
|
||||
<td>
|
||||
<code>{{ host.privileges|join(', ')|raw }}</code>
|
||||
</td>
|
||||
{% if menus_work %}
|
||||
<td class="usrGroup">{{ host.group }}</td>
|
||||
{% endif %}
|
||||
<td>{{ host.has_grant ? 'Yes'|trans : 'No'|trans }}</td>
|
||||
{% if is_grantuser %}
|
||||
<td class="text-center">
|
||||
<a class="edit_user_anchor" href="{{ url('/server/privileges', {
|
||||
'username': host.user,
|
||||
'hostname': host.host,
|
||||
'dbname': '',
|
||||
'tablename': '',
|
||||
'routinename': '',
|
||||
}) }}">
|
||||
{{ get_icon('b_usredit', 'Edit privileges'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if menus_work and user_group_count > 0 %}
|
||||
<td class="text-center">
|
||||
{% if host.user is not empty %}
|
||||
<button type="button" class="btn btn-link p-0" data-bs-toggle="modal" data-bs-target="#editUserGroupModal" data-username="{{ host.user }}">
|
||||
{{ get_icon('b_usrlist', 'Edit user group'|trans) }}
|
||||
</button>
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-center">
|
||||
<a class="export_user_anchor ajax" href="{{ url('/server/privileges', {
|
||||
'username': host.user,
|
||||
'hostname': host.host,
|
||||
'initial': initial,
|
||||
'export': true,
|
||||
}) }}">
|
||||
{{ get_icon('b_tblexport', 'Export'|trans) }}
|
||||
</a>
|
||||
</td>
|
||||
{% if has_account_locking %}
|
||||
<td>
|
||||
<button type="button" class="btn btn-link p-0 jsAccountLocking" title="{{ host.is_account_locked ? 'Unlock this account.'|trans : 'Lock this account.'|trans }}" data-is-locked="{{ host.is_account_locked ? 'true' : 'false' }}" data-user-name="{{ host.user }}" data-host-name="{{ host.host }}">
|
||||
{% if host.is_account_locked %}
|
||||
{% set unlock_text %}{% trans %}Unlock{% context %}Unlock the account.{% endtrans %}{% endset %}
|
||||
{{ get_icon('s_unlock', unlock_text|e) }}
|
||||
{% else %}
|
||||
{% set lock_text %}{% trans %}Lock{% context %}Lock the account.{% endtrans %}{% endset %}
|
||||
{{ get_icon('s_lock', lock_text|e) }}
|
||||
{% endif %}
|
||||
</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="float-start row">
|
||||
<div class="col-12">
|
||||
<img class="selectallarrow" width="38" height="22" src="
|
||||
{{- image('arrow_' ~ text_dir ~ '.png') }}" alt="{% trans 'With selected:' %}">
|
||||
<input type="checkbox" id="usersForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
|
||||
<label for="usersForm_checkall">{% trans 'Check all' %}</label>
|
||||
<em class="with-selected">{% trans 'With selected:' %}</em>
|
||||
|
||||
<button class="btn btn-link mult_submit" type="submit" name="submit_mult" value="export" title="{% trans 'Export' %}">
|
||||
{{ get_icon('b_tblexport', 'Export'|trans) }}
|
||||
</button>
|
||||
|
||||
<input type="hidden" name="initial" value="{{ initial }}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfloat"></div>
|
||||
|
||||
{% if is_createuser %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">{% trans %}New{% context %}Create new user{% endtrans %}</div>
|
||||
<div class="card-body">
|
||||
<a id="add_user_anchor" href="{{ url('/server/privileges', {'adduser': true}) }}">
|
||||
{{ get_icon('b_usradd', 'Add user account'|trans) }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="deleteUserCard" class="card mb-3">
|
||||
<div class="card-header">{{ get_icon('b_usrdrop', 'Remove selected user accounts'|trans) }}</div>
|
||||
<div class="card-body">
|
||||
<p class="card-text">{% trans 'Revoke all active privileges from the users and delete them afterwards.' %}</p>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="dropUsersDbCheckbox" name="drop_users_db">
|
||||
<label class="form-check-label" for="dropUsersDbCheckbox">
|
||||
{% trans 'Drop the databases that have the same names as the users.' %}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer text-end">
|
||||
<input type="hidden" name="mode" value="2">
|
||||
<input id="buttonGo" class="btn btn-primary ajax" type="submit" name="delete" value="{% trans 'Go' %}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="modal fade" id="editUserGroupModal" tabindex="-1" aria-labelledby="editUserGroupModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="editUserGroupModalLabel">{% trans 'Edit user group' %}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{% trans 'Close' %}"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="visually-hidden">{% trans 'Loading…' %}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans 'Close' %}</button>
|
||||
<button type="button" class="btn btn-primary" id="editUserGroupModalSaveButton">{% trans 'Save changes' %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue