A free open source IT asset/license management system
Disable the edit button if permission is not allowed
snipe1dfa1da0ee73
diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.phpindex bff3d6576a..53fc5df2c8 100644--- a/resources/views/partials/bootstrap-table.blade.php+++ b/resources/views/partials/bootstrap-table.blade.php@@ -296,6 +296,10 @@if ((row.available_actions) && (row.available_actions.update === true)) {actions += '<a href="{{ config('app.url') }}/' + dest + '/' + row.id + '/edit" class="actions btn btn-sm btn-warning" data-tooltip="true" title="{{ trans('general.update') }}"><i class="fas fa-pencil-alt" aria-hidden="true"></i><span class="sr-only">{{ trans('general.update') }}</span></a> ';+ } else {+ if ((row.available_actions) && (row.available_actions.update != true)) {+ actions += '<span data-tooltip="true" title="{{ trans('general.cannot_be_edited') }}"><a class="btn btn-warning btn-sm disabled" onClick="return false;"><i class="fas fa-pencil-alt"></i></a></span> ';+ }}if ((row.available_actions) && (row.available_actions.delete === true)) {