mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Añadidos permisos a tarifas, salvo metodo delete
This commit is contained in:
@ -57,7 +57,7 @@ class Tarifasenvios extends \App\Controllers\BaseResourceController {
|
||||
public function index() {
|
||||
|
||||
// Check if the user is allowed to list items
|
||||
parent::checkPermission('tarifa-envio.menu');
|
||||
checkPermission('tarifa-envio.menu');
|
||||
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
@ -75,7 +75,7 @@ class Tarifasenvios extends \App\Controllers\BaseResourceController {
|
||||
|
||||
public function add() {
|
||||
|
||||
parent::checkPermission('tarifa-envio.create', $this->indexRoute);
|
||||
checkPermission('tarifa-envio.create', $this->indexRoute);
|
||||
|
||||
if ($this->request->getPost()) :
|
||||
|
||||
@ -144,7 +144,7 @@ class Tarifasenvios extends \App\Controllers\BaseResourceController {
|
||||
|
||||
public function edit($requestedId = null) {
|
||||
|
||||
parent::checkPermission('tarifa-envio.edit', $this->indexRoute);
|
||||
checkPermission('tarifa-envio.edit', $this->indexRoute);
|
||||
|
||||
|
||||
if ($requestedId == null) :
|
||||
@ -231,9 +231,9 @@ class Tarifasenvios extends \App\Controllers\BaseResourceController {
|
||||
// JJO
|
||||
public function delete($id = null)
|
||||
{
|
||||
if (!auth()->user()->can('tarifa-envio.delete')) {
|
||||
/*if (!auth()->user()->can('tarifa-envio.delete')) {
|
||||
return $this->fail('Error');
|
||||
}
|
||||
}*/
|
||||
|
||||
if (!empty(static::$pluralObjectNameCc) && !empty(static::$singularObjectNameCc)) {
|
||||
$objName = mb_strtolower(lang(ucfirst(static::$pluralObjectNameCc).'.'.static::$singularObjectNameCc));
|
||||
|
||||
Reference in New Issue
Block a user