privileges_table.twig 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. {% if columns is not empty %}
  2. <input type="hidden" name="grant_count" value="{{ row|length }}">
  3. <input type="hidden" name="column_count" value="{{ columns|length }}">
  4. <fieldset id="fieldset_user_priv">
  5. <legend data-submenu-label="{% trans 'Table' %}">
  6. {% trans 'Table-specific privileges' %}
  7. </legend>
  8. <p>
  9. <small><em>{% trans 'Note: MySQL privilege names are expressed in English.' %}</em></small>
  10. </p>
  11. <div class="item" id="div_item_select">
  12. <label for="select_select_priv">
  13. <code><dfn title="{% trans 'Allows reading data.' %}">SELECT</dfn></code>
  14. </label>
  15. <select id="select_select_priv" name="Select_priv[]" size="8" multiple>
  16. {% for curr_col, curr_col_privs in columns %}
  17. <option value="{{ curr_col }}"{{ row['Select_priv'] == 'Y' or curr_col_privs['Select'] ? ' selected' }}>
  18. {{ curr_col }}
  19. </option>
  20. {% endfor %}
  21. </select>
  22. <em>{% trans 'Or' %}</em>
  23. <label for="checkbox_Select_priv_none">
  24. <input type="checkbox" name="Select_priv_none" id="checkbox_Select_priv_none" title="
  25. {%- trans %}None{% context %}None privileges{% endtrans %}">
  26. {% trans %}None{% context %}None privileges{% endtrans %}
  27. </label>
  28. </div>
  29. <div class="item" id="div_item_insert">
  30. <label for="select_insert_priv">
  31. <code><dfn title="{% trans 'Allows inserting and replacing data.' %}">INSERT</dfn></code>
  32. </label>
  33. <select id="select_insert_priv" name="Insert_priv[]" size="8" multiple>
  34. {% for curr_col, curr_col_privs in columns %}
  35. <option value="{{ curr_col }}"{{ row['Insert_priv'] == 'Y' or curr_col_privs['Insert'] ? ' selected' }}>
  36. {{ curr_col }}
  37. </option>
  38. {% endfor %}
  39. </select>
  40. <em>{% trans 'Or' %}</em>
  41. <label for="checkbox_Insert_priv_none">
  42. <input type="checkbox" name="Insert_priv_none" id="checkbox_Insert_priv_none" title="
  43. {%- trans %}None{% context %}None privileges{% endtrans %}">
  44. {% trans %}None{% context %}None privileges{% endtrans %}
  45. </label>
  46. </div>
  47. <div class="item" id="div_item_update">
  48. <label for="select_update_priv">
  49. <code><dfn title="{% trans 'Allows changing data.' %}">UPDATE</dfn></code>
  50. </label>
  51. <select id="select_update_priv" name="Update_priv[]" size="8" multiple>
  52. {% for curr_col, curr_col_privs in columns %}
  53. <option value="{{ curr_col }}"{{ row['Update_priv'] == 'Y' or curr_col_privs['Update'] ? ' selected' }}>
  54. {{ curr_col }}
  55. </option>
  56. {% endfor %}
  57. </select>
  58. <em>{% trans 'Or' %}</em>
  59. <label for="checkbox_Update_priv_none">
  60. <input type="checkbox" name="Update_priv_none" id="checkbox_Update_priv_none" title="
  61. {%- trans %}None{% context %}None privileges{% endtrans %}">
  62. {% trans %}None{% context %}None privileges{% endtrans %}
  63. </label>
  64. </div>
  65. <div class="item" id="div_item_references">
  66. <label for="select_references_priv">
  67. <code><dfn title="{% trans 'Has no effect in this MySQL version.' %}">REFERENCES</dfn></code>
  68. </label>
  69. <select id="select_references_priv" name="References_priv[]" size="8" multiple>
  70. {% for curr_col, curr_col_privs in columns %}
  71. <option value="{{ curr_col }}"{{ row['References_priv'] == 'Y' or curr_col_privs['References'] ? ' selected' }}>
  72. {{ curr_col }}
  73. </option>
  74. {% endfor %}
  75. </select>
  76. <em>{% trans 'Or' %}</em>
  77. <label for="checkbox_References_priv_none">
  78. <input type="checkbox" name="References_priv_none" id="checkbox_References_priv_none" title="
  79. {%- trans %}None{% context %}None privileges{% endtrans %}">
  80. {% trans %}None{% context %}None privileges{% endtrans %}
  81. </label>
  82. </div>
  83. <div class="item">
  84. <div class="item">
  85. <input type="checkbox" name="Delete_priv" id="checkbox_Delete_priv" value="Y" title="
  86. {%- trans 'Allows deleting data.' %}"{{ row['Delete_priv'] == 'Y' ? ' checked' }}>
  87. <label for="checkbox_Delete_priv">
  88. <code>
  89. <dfn title="{% trans 'Allows deleting data.' %}">
  90. DELETE
  91. </dfn>
  92. </code>
  93. </label>
  94. </div>
  95. <div class="item">
  96. <input type="checkbox" name="Create_priv" id="checkbox_Create_priv" value="Y" title="
  97. {%- trans 'Allows creating new tables.' %}"{{ row['Create_priv'] == 'Y' ? ' checked' }}>
  98. <label for="checkbox_Create_priv">
  99. <code>
  100. <dfn title="{% trans 'Allows creating new tables.' %}">
  101. CREATE
  102. </dfn>
  103. </code>
  104. </label>
  105. </div>
  106. <div class="item">
  107. <input type="checkbox" name="Drop_priv" id="checkbox_Drop_priv" value="Y" title="
  108. {%- trans 'Allows dropping tables.' %}"{{ row['Drop_priv'] == 'Y' ? ' checked' }}>
  109. <label for="checkbox_Drop_priv">
  110. <code>
  111. <dfn title="{% trans 'Allows dropping tables.' %}">
  112. DROP
  113. </dfn>
  114. </code>
  115. </label>
  116. </div>
  117. <div class="item">
  118. <input type="checkbox" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
  119. {%- trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}"
  120. {{- row['Grant_priv'] == 'Y' ? ' checked' }}>
  121. <label for="checkbox_Grant_priv">
  122. <code>
  123. <dfn title="{% trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}">
  124. GRANT
  125. </dfn>
  126. </code>
  127. </label>
  128. </div>
  129. <div class="item">
  130. <input type="checkbox" name="Index_priv" id="checkbox_Index_priv" value="Y" title="
  131. {%- trans 'Allows creating and dropping indexes.' %}"{{ row['Index_priv'] == 'Y' ? ' checked' }}>
  132. <label for="checkbox_Index_priv">
  133. <code>
  134. <dfn title="{% trans 'Allows creating and dropping indexes.' %}">
  135. INDEX
  136. </dfn>
  137. </code>
  138. </label>
  139. </div>
  140. <div class="item">
  141. <input type="checkbox" name="Alter_priv" id="checkbox_Alter_priv" value="Y" title="
  142. {%- trans 'Allows altering the structure of existing tables.' %}"{{ row['Alter_priv'] == 'Y' ? ' checked' }}>
  143. <label for="checkbox_Alter_priv">
  144. <code>
  145. <dfn title="{% trans 'Allows altering the structure of existing tables.' %}">
  146. ALTER
  147. </dfn>
  148. </code>
  149. </label>
  150. </div>
  151. <div class="item">
  152. <input type="checkbox" name="Create_view_priv" id="checkbox_Create_view_priv" value="Y" title="
  153. {%- trans 'Allows creating new views.' %}"{{ row['Create View_priv'] == 'Y' ? ' checked' }}>
  154. <label for="checkbox_Create_view_priv">
  155. <code>
  156. <dfn title="{% trans 'Allows creating new views.' %}">
  157. CREATE VIEW
  158. </dfn>
  159. </code>
  160. </label>
  161. </div>
  162. <div class="item">
  163. <input type="checkbox" name="Show_view_priv" id="checkbox_Show_view_priv" value="Y" title="
  164. {%- trans 'Allows performing SHOW CREATE VIEW queries.' %}"{{ row['Show view_priv'] == 'Y' ? ' checked' }}>
  165. <label for="checkbox_Show_view_priv">
  166. <code>
  167. <dfn title="{% trans 'Allows performing SHOW CREATE VIEW queries.' %}">
  168. SHOW VIEW
  169. </dfn>
  170. </code>
  171. </label>
  172. </div>
  173. <div class="item">
  174. <input type="checkbox" name="Trigger_priv" id="checkbox_Trigger_priv" value="Y" title="
  175. {%- trans 'Allows creating and dropping triggers.' %}"{{ row['Trigger_priv'] == 'Y' ? ' checked' }}>
  176. <label for="checkbox_Trigger_priv">
  177. <code>
  178. <dfn title="{% trans 'Allows creating and dropping triggers.' %}">
  179. TRIGGER
  180. </dfn>
  181. </code>
  182. </label>
  183. </div>
  184. {% if row['Delete versioning rows_priv'] is defined or row['Delete_history_priv'] is defined %}
  185. <div class="item">
  186. <input type="checkbox" name="Delete_history_priv" id="checkbox_Delete_history_priv" value="Y" title="
  187. {%- trans 'Allows deleting historical rows.' %}"
  188. {{- row['Delete versioning rows_priv'] == 'Y' or row['Delete_history_priv'] == 'Y' ? ' checked' }}>
  189. <label for="checkbox_Delete_history_priv">
  190. <code>
  191. <dfn title="{% trans 'Allows deleting historical rows.' %}">
  192. DELETE HISTORY
  193. </dfn>
  194. </code>
  195. </label>
  196. </div>
  197. {% endif %}
  198. </div>
  199. <div class="clearfloat"></div>
  200. </fieldset>
  201. {% else %}
  202. {% set grant_count = 0 %}
  203. <fieldset id="fieldset_user_global_rights">
  204. <legend data-submenu-label="
  205. {%- if is_global %}
  206. {%- trans 'Global' -%}
  207. {% elseif is_database %}
  208. {%- trans 'Database' -%}
  209. {% else %}
  210. {%- trans 'Table' -%}
  211. {% endif %}">
  212. {% if is_global %}
  213. {% trans 'Global privileges' %}
  214. {% elseif is_database %}
  215. {% trans 'Database-specific privileges' %}
  216. {% else %}
  217. {% trans 'Table-specific privileges' %}
  218. {% endif %}
  219. <input type="checkbox" id="addUsersForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
  220. <label for="addUsersForm_checkall">{% trans 'Check all' %}</label>
  221. </legend>
  222. <p>
  223. <small><em>{% trans 'Note: MySQL privilege names are expressed in English.' %}</em></small>
  224. </p>
  225. <fieldset>
  226. <legend>
  227. <input type="checkbox" class="sub_checkall_box" id="checkall_Data_priv" title="{% trans 'Check all' %}">
  228. <label for="checkall_Data_priv">{% trans 'Data' %}</label>
  229. </legend>
  230. <div class="item">
  231. {% set grant_count = grant_count + 1 %}
  232. <input type="checkbox" class="checkall" name="Select_priv" id="checkbox_Select_priv" value="Y" title="
  233. {%- trans 'Allows reading data.' %}"{{ row['Select_priv'] == 'Y' ? ' checked' }}>
  234. <label for="checkbox_Select_priv">
  235. <code>
  236. <dfn title="{% trans 'Allows reading data.' %}">
  237. SELECT
  238. </dfn>
  239. </code>
  240. </label>
  241. </div>
  242. <div class="item">
  243. {% set grant_count = grant_count + 1 %}
  244. <input type="checkbox" class="checkall" name="Insert_priv" id="checkbox_Insert_priv" value="Y" title="
  245. {%- trans 'Allows inserting and replacing data.' %}"{{ row['Insert_priv'] == 'Y' ? ' checked' }}>
  246. <label for="checkbox_Insert_priv">
  247. <code>
  248. <dfn title="{% trans 'Allows inserting and replacing data.' %}">
  249. INSERT
  250. </dfn>
  251. </code>
  252. </label>
  253. </div>
  254. <div class="item">
  255. {% set grant_count = grant_count + 1 %}
  256. <input type="checkbox" class="checkall" name="Update_priv" id="checkbox_Update_priv" value="Y" title="
  257. {%- trans 'Allows changing data.' %}"{{ row['Update_priv'] == 'Y' ? ' checked' }}>
  258. <label for="checkbox_Update_priv">
  259. <code>
  260. <dfn title="{% trans 'Allows changing data.' %}">
  261. UPDATE
  262. </dfn>
  263. </code>
  264. </label>
  265. </div>
  266. <div class="item">
  267. {% set grant_count = grant_count + 1 %}
  268. <input type="checkbox" class="checkall" name="Delete_priv" id="checkbox_Delete_priv" value="Y" title="
  269. {%- trans 'Allows deleting data.' %}"{{ row['Delete_priv'] == 'Y' ? ' checked' }}>
  270. <label for="checkbox_Delete_priv">
  271. <code>
  272. <dfn title="{% trans 'Allows deleting data.' %}">
  273. DELETE
  274. </dfn>
  275. </code>
  276. </label>
  277. </div>
  278. {% if is_global %}
  279. <div class="item">
  280. {% set grant_count = grant_count + 1 %}
  281. <input type="checkbox" class="checkall" name="File_priv" id="checkbox_File_priv" value="Y" title="
  282. {%- trans 'Allows importing data from and exporting data into files.' %}"{{ row['File_priv'] == 'Y' ? ' checked' }}>
  283. <label for="checkbox_File_priv">
  284. <code>
  285. <dfn title="{% trans 'Allows importing data from and exporting data into files.' %}">
  286. FILE
  287. </dfn>
  288. </code>
  289. </label>
  290. </div>
  291. {% endif %}
  292. </fieldset>
  293. <fieldset>
  294. <legend>
  295. <input type="checkbox" class="sub_checkall_box" id="checkall_Structure_priv" title="{% trans 'Check all' %}">
  296. <label for="checkall_Structure_priv">{% trans 'Structure' %}</label>
  297. </legend>
  298. <div class="item">
  299. {% set grant_count = grant_count + 1 %}
  300. <input type="checkbox" class="checkall" name="Create_priv" id="checkbox_Create_priv" value="Y" title="
  301. {%- if is_database %}
  302. {%- trans 'Allows creating new databases and tables.' -%}
  303. {% else %}
  304. {%- trans 'Allows creating new tables.' -%}
  305. {% endif %}"{{ row['Create_priv'] == 'Y' ? ' checked' }}>
  306. <label for="checkbox_Create_priv">
  307. <code>
  308. <dfn title="
  309. {%- if is_database %}
  310. {%- trans 'Allows creating new databases and tables.' -%}
  311. {% else %}
  312. {%- trans 'Allows creating new tables.' -%}
  313. {% endif %}">
  314. CREATE
  315. </dfn>
  316. </code>
  317. </label>
  318. </div>
  319. <div class="item">
  320. {% set grant_count = grant_count + 1 %}
  321. <input type="checkbox" class="checkall" name="Alter_priv" id="checkbox_Alter_priv" value="Y" title="
  322. {%- trans 'Allows altering the structure of existing tables.' %}"{{ row['Alter_priv'] == 'Y' ? ' checked' }}>
  323. <label for="checkbox_Alter_priv">
  324. <code>
  325. <dfn title="{% trans 'Allows altering the structure of existing tables.' %}">
  326. ALTER
  327. </dfn>
  328. </code>
  329. </label>
  330. </div>
  331. <div class="item">
  332. {% set grant_count = grant_count + 1 %}
  333. <input type="checkbox" class="checkall" name="Index_priv" id="checkbox_Index_priv" value="Y" title="
  334. {%- trans 'Allows creating and dropping indexes.' %}"{{ row['Index_priv'] == 'Y' ? ' checked' }}>
  335. <label for="checkbox_Index_priv">
  336. <code>
  337. <dfn title="{% trans 'Allows creating and dropping indexes.' %}">
  338. INDEX
  339. </dfn>
  340. </code>
  341. </label>
  342. </div>
  343. <div class="item">
  344. {% set grant_count = grant_count + 1 %}
  345. <input type="checkbox" class="checkall" name="Drop_priv" id="checkbox_Drop_priv" value="Y" title="
  346. {%- if is_database %}
  347. {%- trans 'Allows dropping databases and tables.' -%}
  348. {% else %}
  349. {%- trans 'Allows dropping tables.' -%}
  350. {% endif %}"{{ row['Drop_priv'] == 'Y' ? ' checked' }}>
  351. <label for="checkbox_Drop_priv">
  352. <code>
  353. <dfn title="
  354. {%- if is_database %}
  355. {%- trans 'Allows dropping databases and tables.' -%}
  356. {% else %}
  357. {%- trans 'Allows dropping tables.' -%}
  358. {% endif %}">
  359. DROP
  360. </dfn>
  361. </code>
  362. </label>
  363. </div>
  364. <div class="item">
  365. {% set grant_count = grant_count + 1 %}
  366. <input type="checkbox" class="checkall" name="Create_tmp_table_priv" id="checkbox_Create_tmp_table_priv" value="Y" title="
  367. {%- trans 'Allows creating temporary tables.' %}"{{ row['Create_tmp_table_priv'] == 'Y' ? ' checked' }}>
  368. <label for="checkbox_Create_tmp_table_priv">
  369. <code>
  370. <dfn title="{% trans 'Allows creating temporary tables.' %}">
  371. CREATE TEMPORARY TABLES
  372. </dfn>
  373. </code>
  374. </label>
  375. </div>
  376. <div class="item">
  377. {% set grant_count = grant_count + 1 %}
  378. <input type="checkbox" class="checkall" name="Show_view_priv" id="checkbox_Show_view_priv" value="Y" title="
  379. {%- trans 'Allows performing SHOW CREATE VIEW queries.' %}"{{ row['Show_view_priv'] == 'Y' ? ' checked' }}>
  380. <label for="checkbox_Show_view_priv">
  381. <code>
  382. <dfn title="{% trans 'Allows performing SHOW CREATE VIEW queries.' %}">
  383. SHOW VIEW
  384. </dfn>
  385. </code>
  386. </label>
  387. </div>
  388. <div class="item">
  389. {% set grant_count = grant_count + 1 %}
  390. <input type="checkbox" class="checkall" name="Create_routine_priv" id="checkbox_Create_routine_priv" value="Y" title="
  391. {%- trans 'Allows creating stored routines.' %}"{{ row['Create_routine_priv'] == 'Y' ? ' checked' }}>
  392. <label for="checkbox_Create_routine_priv">
  393. <code>
  394. <dfn title="{% trans 'Allows creating stored routines.' %}">
  395. CREATE ROUTINE
  396. </dfn>
  397. </code>
  398. </label>
  399. </div>
  400. <div class="item">
  401. {% set grant_count = grant_count + 1 %}
  402. <input type="checkbox" class="checkall" name="Alter_routine_priv" id="checkbox_Alter_routine_priv" value="Y" title="
  403. {%- trans 'Allows altering and dropping stored routines.' %}"{{ row['Alter_routine_priv'] == 'Y' ? ' checked' }}>
  404. <label for="checkbox_Alter_routine_priv">
  405. <code>
  406. <dfn title="{% trans 'Allows altering and dropping stored routines.' %}">
  407. ALTER ROUTINE
  408. </dfn>
  409. </code>
  410. </label>
  411. </div>
  412. <div class="item">
  413. {% set grant_count = grant_count + 1 %}
  414. <input type="checkbox" class="checkall" name="Execute_priv" id="checkbox_Execute_priv" value="Y" title="
  415. {%- trans 'Allows executing stored routines.' %}"{{ row['Execute_priv'] == 'Y' ? ' checked' }}>
  416. <label for="checkbox_Execute_priv">
  417. <code>
  418. <dfn title="{% trans 'Allows executing stored routines.' %}">
  419. EXECUTE
  420. </dfn>
  421. </code>
  422. </label>
  423. </div>
  424. {% if row['Create_view_priv'] is defined %}
  425. <div class="item">
  426. {% set grant_count = grant_count + 1 %}
  427. <input type="checkbox" class="checkall" name="Create_view_priv" id="checkbox_Create_view_priv" value="Y" title="
  428. {%- trans 'Allows creating new views.' %}"{{ row['Create_view_priv'] == 'Y' ? ' checked' }}>
  429. <label for="checkbox_Create_view_priv">
  430. <code>
  431. <dfn title="{% trans 'Allows creating new views.' %}">
  432. CREATE VIEW
  433. </dfn>
  434. </code>
  435. </label>
  436. </div>
  437. {% endif %}
  438. {% if row['Create View_priv'] is defined %}
  439. <div class="item">
  440. {% set grant_count = grant_count + 1 %}
  441. <input type="checkbox" class="checkall" name="Create View_priv" id="checkbox_Create View_priv" value="Y" title="
  442. {%- trans 'Allows creating new views.' %}"{{ row['Create View_priv'] == 'Y' ? ' checked' }}>
  443. <label for="checkbox_Create View_priv">
  444. <code>
  445. <dfn title="{% trans 'Allows creating new views.' %}">
  446. CREATE VIEW
  447. </dfn>
  448. </code>
  449. </label>
  450. </div>
  451. {% endif %}
  452. {% if row['Event_priv'] is defined %}
  453. <div class="item">
  454. {% set grant_count = grant_count + 1 %}
  455. <input type="checkbox" class="checkall" name="Event_priv" id="checkbox_Event_priv" value="Y" title="
  456. {%- trans 'Allows to set up events for the event scheduler.' %}"{{ row['Event_priv'] == 'Y' ? ' checked' }}>
  457. <label for="checkbox_Event_priv">
  458. <code>
  459. <dfn title="{% trans 'Allows to set up events for the event scheduler.' %}">
  460. EVENT
  461. </dfn>
  462. </code>
  463. </label>
  464. </div>
  465. <div class="item">
  466. {% set grant_count = grant_count + 1 %}
  467. <input type="checkbox" class="checkall" name="Trigger_priv" id="checkbox_Trigger_priv" value="Y" title="
  468. {%- trans 'Allows creating and dropping triggers.' %}"{{ row['Trigger_priv'] == 'Y' ? ' checked' }}>
  469. <label for="checkbox_Trigger_priv">
  470. <code>
  471. <dfn title="{% trans 'Allows creating and dropping triggers.' %}">
  472. TRIGGER
  473. </dfn>
  474. </code>
  475. </label>
  476. </div>
  477. {% endif %}
  478. </fieldset>
  479. <fieldset>
  480. <legend>
  481. <input type="checkbox" class="sub_checkall_box" id="checkall_Administration_priv" title="{% trans 'Check all' %}">
  482. <label for="checkall_Administration_priv">{% trans 'Administration' %}</label>
  483. </legend>
  484. {% if is_global %}
  485. <div class="item">
  486. {% set grant_count = grant_count + 1 %}
  487. <input type="checkbox" class="checkall" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
  488. {%- trans 'Allows adding users and privileges without reloading the privilege tables.' %}"{{ row['Grant_priv'] == 'Y' ? ' checked' }}>
  489. <label for="checkbox_Grant_priv">
  490. <code>
  491. <dfn title="{% trans 'Allows adding users and privileges without reloading the privilege tables.' %}">
  492. GRANT
  493. </dfn>
  494. </code>
  495. </label>
  496. </div>
  497. <div class="item">
  498. {% set grant_count = grant_count + 1 %}
  499. <input type="checkbox" class="checkall" name="Super_priv" id="checkbox_Super_priv" value="Y" title="
  500. {%- 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.' %}"
  501. {{- row['Super_priv'] == 'Y' ? ' checked' }}>
  502. <label for="checkbox_Super_priv">
  503. <code>
  504. <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.' %}">
  505. SUPER
  506. </dfn>
  507. </code>
  508. </label>
  509. </div>
  510. <div class="item">
  511. {% set grant_count = grant_count + 1 %}
  512. <input type="checkbox" class="checkall" name="Process_priv" id="checkbox_Process_priv" value="Y" title="
  513. {%- trans 'Allows viewing processes of all users.' %}"{{ row['Process_priv'] == 'Y' ? ' checked' }}>
  514. <label for="checkbox_Process_priv">
  515. <code>
  516. <dfn title="{% trans 'Allows viewing processes of all users.' %}">
  517. PROCESS
  518. </dfn>
  519. </code>
  520. </label>
  521. </div>
  522. <div class="item">
  523. {% set grant_count = grant_count + 1 %}
  524. <input type="checkbox" class="checkall" name="Reload_priv" id="checkbox_Reload_priv" value="Y" title="
  525. {%- trans 'Allows reloading server settings and flushing the server\'s caches.' %}"{{ row['Reload_priv'] == 'Y' ? ' checked' }}>
  526. <label for="checkbox_Reload_priv">
  527. <code>
  528. <dfn title="{% trans 'Allows reloading server settings and flushing the server\'s caches.' %}">
  529. RELOAD
  530. </dfn>
  531. </code>
  532. </label>
  533. </div>
  534. <div class="item">
  535. {% set grant_count = grant_count + 1 %}
  536. <input type="checkbox" class="checkall" name="Shutdown_priv" id="checkbox_Shutdown_priv" value="Y" title="
  537. {%- trans 'Allows shutting down the server.' %}"{{ row['Shutdown_priv'] == 'Y' ? ' checked' }}>
  538. <label for="checkbox_Shutdown_priv">
  539. <code>
  540. <dfn title="{% trans 'Allows shutting down the server.' %}">
  541. SHUTDOWN
  542. </dfn>
  543. </code>
  544. </label>
  545. </div>
  546. <div class="item">
  547. {% set grant_count = grant_count + 1 %}
  548. <input type="checkbox" class="checkall" name="Show_db_priv" id="checkbox_Show_db_priv" value="Y" title="
  549. {%- trans 'Gives access to the complete list of databases.' %}"{{ row['Show_db_priv'] == 'Y' ? ' checked' }}>
  550. <label for="checkbox_Show_db_priv">
  551. <code>
  552. <dfn title="{% trans 'Gives access to the complete list of databases.' %}">
  553. SHOW DATABASES
  554. </dfn>
  555. </code>
  556. </label>
  557. </div>
  558. {% else %}
  559. <div class="item">
  560. {% set grant_count = grant_count + 1 %}
  561. <input type="checkbox" class="checkall" name="Grant_priv" id="checkbox_Grant_priv" value="Y" title="
  562. {%- trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}"
  563. {{- row['Grant_priv'] == 'Y' ? ' checked' }}>
  564. <label for="checkbox_Grant_priv">
  565. <code>
  566. <dfn title="{% trans 'Allows user to give to other users or remove from other users the privileges that user possess yourself.' %}">
  567. GRANT
  568. </dfn>
  569. </code>
  570. </label>
  571. </div>
  572. {% endif %}
  573. <div class="item">
  574. {% set grant_count = grant_count + 1 %}
  575. <input type="checkbox" class="checkall" name="Lock_tables_priv" id="checkbox_Lock_tables_priv" value="Y" title="
  576. {%- trans 'Allows locking tables for the current thread.' %}"{{ row['Lock_tables_priv'] == 'Y' ? ' checked' }}>
  577. <label for="checkbox_Lock_tables_priv">
  578. <code>
  579. <dfn title="{% trans 'Allows locking tables for the current thread.' %}">
  580. LOCK TABLES
  581. </dfn>
  582. </code>
  583. </label>
  584. </div>
  585. <div class="item">
  586. {% set grant_count = grant_count + 1 %}
  587. <input type="checkbox" class="checkall" name="References_priv" id="checkbox_References_priv" value="Y" title="
  588. {%- trans 'Has no effect in this MySQL version.' %}"{{ row['References_priv'] == 'Y' ? ' checked' }}>
  589. <label for="checkbox_References_priv">
  590. <code>
  591. {# l10n: The "REFERENCES" privilege when granting privileges #}
  592. <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) }}">
  593. REFERENCES
  594. </dfn>
  595. </code>
  596. </label>
  597. </div>
  598. {% if is_global %}
  599. <div class="item">
  600. {% set grant_count = grant_count + 1 %}
  601. <input type="checkbox" class="checkall" name="Repl_client_priv" id="checkbox_Repl_client_priv" value="Y" title="
  602. {%- trans 'Allows the user to ask where the slaves / masters are.' %}"{{ row['Repl_client_priv'] == 'Y' ? ' checked' }}>
  603. <label for="checkbox_Repl_client_priv">
  604. <code>
  605. <dfn title="{% trans 'Allows the user to ask where the slaves / masters are.' %}">
  606. REPLICATION CLIENT
  607. </dfn>
  608. </code>
  609. </label>
  610. </div>
  611. <div class="item">
  612. {% set grant_count = grant_count + 1 %}
  613. <input type="checkbox" class="checkall" name="Repl_slave_priv" id="checkbox_Repl_slave_priv" value="Y" title="
  614. {%- trans 'Needed for the replication slaves.' %}"{{ row['Repl_slave_priv'] == 'Y' ? ' checked' }}>
  615. <label for="checkbox_Repl_slave_priv">
  616. <code>
  617. <dfn title="{% trans 'Needed for the replication slaves.' %}">
  618. REPLICATION SLAVE
  619. </dfn>
  620. </code>
  621. </label>
  622. </div>
  623. <div class="item">
  624. {% set grant_count = grant_count + 1 %}
  625. <input type="checkbox" class="checkall" name="Create_user_priv" id="checkbox_Create_user_priv" value="Y" title="
  626. {%- trans 'Allows creating, dropping and renaming user accounts.' %}"{{ row['Create_user_priv'] == 'Y' ? ' checked' }}>
  627. <label for="checkbox_Create_user_priv">
  628. <code>
  629. <dfn title="{% trans 'Allows creating, dropping and renaming user accounts.' %}">
  630. CREATE USER
  631. </dfn>
  632. </code>
  633. </label>
  634. </div>
  635. {% endif %}
  636. </fieldset>
  637. {% if is_global %}
  638. <fieldset>
  639. <legend>{% trans 'Resource limits' %}</legend>
  640. <p>
  641. <small><em>{% trans 'Note: Setting these options to 0 (zero) removes the limit.' %}</em></small>
  642. </p>
  643. <div class="item">
  644. <label for="text_max_questions">
  645. <code>
  646. <dfn title="{% trans 'Limits the number of queries the user may send to the server per hour.' %}">
  647. MAX QUERIES PER HOUR
  648. </dfn>
  649. </code>
  650. </label>
  651. <input type="number" name="max_questions" id="text_max_questions" value="
  652. {{- row.max_questions ?? '0' }}" title="
  653. {%- trans 'Limits the number of queries the user may send to the server per hour.' %}">
  654. </div>
  655. <div class="item">
  656. <label for="text_max_updates">
  657. <code>
  658. <dfn title="{% trans 'Limits the number of commands that change any table or database the user may execute per hour.' %}">
  659. MAX UPDATES PER HOUR
  660. </dfn>
  661. </code>
  662. </label>
  663. <input type="number" name="max_updates" id="text_max_updates" value="
  664. {{- row.max_updates ?? '0' }}" title="
  665. {%- trans 'Limits the number of commands that change any table or database the user may execute per hour.' %}">
  666. </div>
  667. <div class="item">
  668. <label for="text_max_connections">
  669. <code>
  670. <dfn title="{% trans 'Limits the number of new connections the user may open per hour.' %}">
  671. MAX CONNECTIONS PER HOUR
  672. </dfn>
  673. </code>
  674. </label>
  675. <input type="number" name="max_connections" id="text_max_connections" value="
  676. {{- row.max_connections ?? '0' }}" title="
  677. {%- trans 'Limits the number of new connections the user may open per hour.' %}">
  678. </div>
  679. <div class="item">
  680. <label for="text_max_user_connections">
  681. <code>
  682. <dfn title="{% trans 'Limits the number of simultaneous connections the user may have.' %}">
  683. MAX USER_CONNECTIONS
  684. </dfn>
  685. </code>
  686. </label>
  687. <input type="number" name="max_user_connections" id="text_max_user_connections" value="
  688. {{- row.max_user_connections ?? '0' }}" title="
  689. {%- trans 'Limits the number of simultaneous connections the user may have.' %}">
  690. </div>
  691. </fieldset>
  692. <fieldset>
  693. <legend>SSL</legend>
  694. <div id="require_ssl_div">
  695. <div class="item">
  696. <input type="radio" name="ssl_type" id="ssl_type_NONE" title="
  697. {%- trans 'Does not require SSL-encrypted connections.' %}" value="NONE"
  698. {{- row.ssl_type == 'NONE' or row.ssl_type == '' ? ' checked' }}>
  699. <label for="ssl_type_NONE">
  700. <code>REQUIRE NONE</code>
  701. </label>
  702. </div>
  703. <div class="item">
  704. <input type="radio" name="ssl_type" id="ssl_type_ANY" title="
  705. {%- trans 'Requires SSL-encrypted connections.' %}" value="ANY"
  706. {{- row.ssl_type == 'ANY' ? ' checked' }}>
  707. <label for="ssl_type_ANY">
  708. <code>REQUIRE SSL</code>
  709. </label>
  710. </div>
  711. <div class="item">
  712. <input type="radio" name="ssl_type" id="ssl_type_X509" title="
  713. {%- trans 'Requires a valid X509 certificate.' %}" value="X509"
  714. {{- row.ssl_type == 'X509' ? ' checked' }}>
  715. <label for="ssl_type_X509">
  716. <code>REQUIRE X509</code>
  717. </label>
  718. </div>
  719. <div class="item">
  720. <input type="radio" name="ssl_type" id="ssl_type_SPECIFIED" value="SPECIFIED"
  721. {{- row.ssl_type == 'SPECIFIED' ? ' checked' }}>
  722. <label for="ssl_type_SPECIFIED">
  723. <code>SPECIFIED</code>
  724. </label>
  725. </div>
  726. <div id="specified_div" style="padding-left:20px;">
  727. <div class="item">
  728. <label for="text_ssl_cipher">
  729. <code>REQUIRE CIPHER</code>
  730. </label>
  731. <input type="text" name="ssl_cipher" id="text_ssl_cipher" value="{{ row.ssl_cipher }}" size="80" title="
  732. {%- trans 'Requires that a specific cipher method be used for a connection.' %}"
  733. {{- row.ssl_type != 'SPECIFIED' ? ' disabled' }}>
  734. </div>
  735. <div class="item">
  736. <label for="text_x509_issuer">
  737. <code>REQUIRE ISSUER</code>
  738. </label>
  739. <input type="text" name="x509_issuer" id="text_x509_issuer" value="{{ row.x509_issuer }}" size="80" title="
  740. {%- trans 'Requires that a valid X509 certificate issued by this CA be presented.' %}"
  741. {{- row.ssl_type != 'SPECIFIED' ? ' disabled' }}>
  742. </div>
  743. <div class="item">
  744. <label for="text_x509_subject">
  745. <code>REQUIRE SUBJECT</code>
  746. </label>
  747. <input type="text" name="x509_subject" id="text_x509_subject" value="{{ row.x509_subject }}" size="80" title="
  748. {%- trans 'Requires that a valid X509 certificate with this subject be presented.' %}"
  749. {{- row.ssl_type != 'SPECIFIED' ? ' disabled' }}>
  750. </div>
  751. </div>
  752. </div>
  753. </fieldset>
  754. {% endif %}
  755. <div class="clearfloat"></div>
  756. </fieldset>
  757. <input type="hidden" name="grant_count" value="{{ grant_count - (row['Grant_priv'] is defined ? 1 : 0) }}">
  758. {% endif %}
  759. {% if has_submit %}
  760. <fieldset id="fieldset_user_privtable_footer" class="tblFooters">
  761. <input type="hidden" name="update_privs" value="1">
  762. <input class="btn btn-primary" type="submit" value="{% trans 'Go' %}">
  763. </fieldset>
  764. {% endif %}