mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
WebAdmin: refactor template permissions
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -108,19 +108,8 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
||||
|
||||
<div class="d-flex justify-content-end mt-12">
|
||||
<input type="hidden" name="_form_token" value="{{.CSRFToken}}">
|
||||
{{- if eq .Mode 3}}
|
||||
<button type="submit" id="form_generate_submit" class="btn btn-secondary px-10 me-10" name="form_action" value="export_from_template">
|
||||
<span data-i18n="virtual_folders.submit_export" class="indicator-label">
|
||||
Generate and export folders
|
||||
</span>
|
||||
<span data-i18n="general.wait" class="indicator-progress">
|
||||
Please wait...
|
||||
<span class="spinner-border spinner-border-sm align-middle ms-2"></span>
|
||||
</span>
|
||||
</button>
|
||||
{{- end}}
|
||||
<button type="submit" id="form_submit" class="btn btn-primary px-10" name="form_action" value="submit">
|
||||
<span {{if eq .Mode 3}}data-i18n="virtual_folders.submit_generate"{{else}}data-i18n="general.submit"{{end}} class="indicator-label">
|
||||
<span data-i18n="general.submit" class="indicator-label">
|
||||
Submit
|
||||
</span>
|
||||
<span data-i18n="general.wait" class="indicator-progress">
|
||||
|
||||
@@ -300,14 +300,10 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
||||
actions+=`<div class="menu-item px-3">
|
||||
<a data-i18n="general.edit" href="#" class="menu-link px-3" data-table-action="edit_row">Edit</a>
|
||||
</div>`;
|
||||
//{{- end}}
|
||||
//{{- if .LoggedUser.HasPermission "*"}}
|
||||
numActions++;
|
||||
actions+=`<div class="menu-item px-3">
|
||||
<a data-i18n="general.template" href="#" class="menu-link px-3" data-table-action="template_row">Template</a>
|
||||
</div>`;
|
||||
//{{- end}}
|
||||
//{{- if .LoggedUser.HasPermission "manage_folders"}}
|
||||
numActions++;
|
||||
actions+=`<div class="menu-item px-3">
|
||||
<a data-i18n="general.delete" href="#" class="menu-link text-danger px-3" data-table-action="delete_row">Delete</a>
|
||||
|
||||
@@ -801,19 +801,8 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
||||
<div class="d-flex justify-content-end mt-12">
|
||||
<input type="hidden" name="expiration_date" id="hidden_start_datetime" value="">
|
||||
<input type="hidden" name="_form_token" value="{{.CSRFToken}}">
|
||||
{{- if eq .Mode 3}}
|
||||
<button type="submit" id="form_generate_submit" class="btn btn-secondary px-10 me-10" name="form_action" value="export_from_template">
|
||||
<span data-i18n="user.submit_export" class="indicator-label">
|
||||
Generate and export users
|
||||
</span>
|
||||
<span data-i18n="general.wait" class="indicator-progress">
|
||||
Please wait...
|
||||
<span class="spinner-border spinner-border-sm align-middle ms-2"></span>
|
||||
</span>
|
||||
</button>
|
||||
{{- end}}
|
||||
<button type="submit" id="form_submit" class="btn btn-primary px-10" name="form_action" value="submit">
|
||||
<span {{if eq .Mode 3}}data-i18n="user.submit_generate"{{else}}data-i18n="general.submit"{{end}} class="indicator-label">
|
||||
<span data-i18n="general.submit" class="indicator-label">
|
||||
Submit
|
||||
</span>
|
||||
<span data-i18n="general.wait" class="indicator-progress">
|
||||
|
||||
@@ -547,7 +547,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
||||
<a data-i18n="general.edit" href="#" class="menu-link px-3" data-table-action="edit_row">Edit</a>
|
||||
</div>`;
|
||||
//{{- end}}
|
||||
//{{- if .LoggedUser.HasPermission "*"}}
|
||||
//{{- if .LoggedUser.HasPermissions "add_users" "edit_users"}}
|
||||
numActions++;
|
||||
actions+=`<div class="menu-item px-3">
|
||||
<a data-i18n="general.template" href="#" class="menu-link px-3" data-table-action="template_row">Template</a>
|
||||
|
||||
Reference in New Issue
Block a user