diff --git a/Layout/default/menu.php b/Layout/default/menu.php index a89e242a1..69308eba0 100644 --- a/Layout/default/menu.php +++ b/Layout/default/menu.php @@ -69,7 +69,7 @@
  • "> Pops
  • - is(["Admin"]) || ($me->is("netowner","lineplanner","pipeplanner","pipeworker","lineworker","salespartner"))): ?> + is(["Admin"]) || $me->is("netowner")) && !$me->can("DevicesDisabled")): ?>
  • "> Devices
  • is(["Admin"])): ?> diff --git a/application/User/UserController.php b/application/User/UserController.php index 474a12468..ad5db41a6 100644 --- a/application/User/UserController.php +++ b/application/User/UserController.php @@ -264,7 +264,7 @@ class UserController extends mfBaseController $canPermissions = [ 'Building', 'Pipework', 'Linework', 'Patching', 'Filestore', - 'Cpeprovisioning', 'Cpeshipping', 'Voipnumbering', 'Preorder', + 'Cpeprovisioning', 'Cpeshipping', 'DevicesDisabled', 'Voipnumbering', 'Preorder', 'Preorderpricing', 'PreorderpricingReadonly', 'Preorderbilling', 'PreorderbillingReadonly', 'Order', 'Billing', 'Fibu', 'Statistics', 'WarehouseAdmin', 'WarehouseEShop', 'WarehouseUser', 'ADBExtended', diff --git a/db/migrations/20251007114629_worker_permission_add_disable_devices.php b/db/migrations/20251007114629_worker_permission_add_disable_devices.php new file mode 100644 index 000000000..1461e756b --- /dev/null +++ b/db/migrations/20251007114629_worker_permission_add_disable_devices.php @@ -0,0 +1,31 @@ +getEnvironment() == "thetool") { + $table = $this->table("WorkerPermission"); + $table->addColumn("canDevicesDisabled", "enum", ["values" => 'false,true', "default" => "false", "after" => "canCpeshipping"]); + $table->update(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } + + public function down(): void + { + if($this->getEnvironment() == "thetool") { + $this->table("WorkerPermission")->removeColumn("canDevicesDisabled")->update(); + } + + if($this->getEnvironment() == "addressdb") { + + } + } +}