Fix acl checking on unlock buttons #30
This commit is contained in:
parent
6262f933bc
commit
9cef8b4246
2 changed files with 7 additions and 3 deletions
|
|
@ -111,7 +111,9 @@
|
|||
var actions = '<a href="' + row.meta.update_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit" title="View / Edit"><i class="la la-edit"></i></a>';
|
||||
|
||||
{% if is_granted('jo_assign.unlock') %}
|
||||
actions += '<a href="' + row.meta.unlock_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit" title="Unlock"><i class="fa fa-unlock"></i></a>';
|
||||
if (row.meta.unlock_url != '') {
|
||||
actions += '<a href="' + row.meta.unlock_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit" title="Unlock"><i class="fa fa-unlock"></i></a>';
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
return actions;
|
||||
|
|
|
|||
|
|
@ -106,8 +106,10 @@
|
|||
template: function (row, index, datatable) {
|
||||
var actions = '<a href="' + row.meta.update_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit" title="View / Edit"><i class="la la-edit"></i></a>';
|
||||
|
||||
{% if row.meta.unlock_url != "" && is_granted('jo_proc.unlock') %}
|
||||
actions += '<a href="' + row.meta.unlock_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit" title="Unlock"><i class="fa fa-unlock"></i></a>';
|
||||
{% if is_granted('jo_proc.unlock') %}
|
||||
if (row.meta.unlock_url != '') {
|
||||
actions += '<a href="' + row.meta.unlock_url + '" class="m-portlet__nav-link btn m-btn m-btn--hover-accent m-btn--icon m-btn--icon-only m-btn--pill btn-edit" title="Unlock"><i class="fa fa-unlock"></i></a>';
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
return actions;
|
||||
|
|
|
|||
Loading…
Reference in a new issue