From: Sven Schöling Date: Fri, 7 May 2021 14:21:29 +0000 (+0200) Subject: Developer Recht und neue Menüeinträge für Testcontroller X-Git-Tag: kivitendo-mebil_0.1-0~9^2~63 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=eea0a76f063de3be42500cb519790cae82e3cc34;p=kivitendo-erp.git Developer Recht und neue Menüeinträge für Testcontroller --- diff --git a/SL/Controller/MaterializeTest.pm b/SL/Controller/MaterializeTest.pm index cbf25d5bf..4cfceb3ce 100644 --- a/SL/Controller/MaterializeTest.pm +++ b/SL/Controller/MaterializeTest.pm @@ -3,6 +3,8 @@ package SL::Controller::MaterializeTest; use strict; use parent qw(SL::Controller::Base); +__PACKAGE__->run_before(sub { $::auth->assert('developer') }); + sub action_components { $_[0]->render("test/components"); } diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index 3f7409e8b..cdab2a4c5 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -41,6 +41,9 @@ use Rose::Object::MakeMethods::Generic ( __PACKAGE__->run_before(sub { $::auth->assert('part_service_assembly_edit') }, except => [ qw(ajax_autocomplete part_picker_search part_picker_result) ]); +__PACKAGE__->run_before(sub { $::auth->assert('developer') }, + only => [ qw(test_page) ]); + __PACKAGE__->run_before('check_part_id', only => [ qw(edit delete) ]); # actions for editing parts diff --git a/locale/de/all b/locale/de/all index 736d28b3c..b6a3b2e1b 100755 --- a/locale/de/all +++ b/locale/de/all @@ -687,7 +687,7 @@ $self->{texts} = { 'Compare to' => 'Gegenüberstellen zu', 'Complexities' => 'Komplexitätsgrade', 'Complexity' => 'Komplexität', - 'Component Test' => 'Komponententest', + 'Component Test' => 'Komponenten-Test', 'Configuration' => 'Konfiguration', 'Configuration of individual TODO items' => 'Konfiguration für die einzelnen Aufgabenlistenpunkte', 'Configure' => 'Konfigurieren', @@ -1068,6 +1068,7 @@ $self->{texts} = { 'Details' => 'Details', 'Details (one letter abbreviation)' => 'D', 'Details: #1' => 'Details: #1', + 'Developer Tools' => 'Developer Tools', 'Dial command missing in kivitendo configuration\'s [cti] section' => 'Wählbefehl fehlt im Abschnitt [cti] der kivitendo-Konfiguration', 'Difference' => 'Differenz', 'Dimensions' => 'Abmessungen', @@ -2044,7 +2045,7 @@ $self->{texts} = { 'Mobile' => 'Mobiltelefon', 'Mobile1' => 'Mobil 1', 'Mobile2' => 'Mobil 2', - 'Modal Test' => 'Modals Test', + 'Modal Test' => 'Modals-Test', 'Model' => 'Lieferanten-Art-Nr.', 'Model (with X being a number)' => 'Lieferanten-Art-Nr. (X ist eine fortlaufende Zahl)', 'Modification date' => 'Änderungsdatum', @@ -2366,6 +2367,7 @@ $self->{texts} = { 'Part Notes' => 'Bemerkungen', 'Part Number' => 'Artikelnummer', 'Part Number missing!' => 'Artikelnummer fehlt!', + 'Part Test' => '', 'Part Type' => 'Artikel-Typ', 'Part Unit' => 'Einheit', 'Part classifications' => 'Artikel-Klassifizierungen', @@ -2955,6 +2957,7 @@ $self->{texts} = { 'Section/Function block actions' => 'Abschnitts-/Funktionsblockaktionen', 'Sections' => 'Abschnitte', 'Sections that are not assigned to any of the items above will be added as new positions.' => 'Abschnitte, die keiner der oben aufgeführten Positionen zugeordnet sind, werden als neue Positionen ergänzt.', + 'See various menu entries intended for developers' => 'Entwickler-Tools anzeigen', 'Select' => 'auswählen', 'Select Mulit-Item Options' => 'Multi-Treffer Auswahlliste', 'Select a Customer' => 'Endkunde auswählen', diff --git a/menus/mobile/00-erp.yaml b/menus/mobile/00-erp.yaml index a5e30b19b..448a5549b 100644 --- a/menus/mobile/00-erp.yaml +++ b/menus/mobile/00-erp.yaml @@ -13,10 +13,12 @@ - id: component_test name: Component Test order: 200 + access: developer params: action: MaterializeTest/components - id: modal_test name: Modal Test order: 300 + access: developer params: action: MaterializeTest/modal diff --git a/menus/user/00-erp.yaml b/menus/user/00-erp.yaml index 118d8fc11..63b12fe4a 100644 --- a/menus/user/00-erp.yaml +++ b/menus/user/00-erp.yaml @@ -1537,3 +1537,17 @@ order: 700 params: action: LoginScreen/logout + +- id: develop + name: Developer Tools + icon: developer + order: 1200 + access: developer +- parent: develop + id: part_test + name: Part Test + access: developer + icon: part + order: 100 + params: + action: Part/test_page diff --git a/sql/Pg-upgrade2-auth/right_develop.sql b/sql/Pg-upgrade2-auth/right_develop.sql new file mode 100644 index 000000000..2eecf7437 --- /dev/null +++ b/sql/Pg-upgrade2-auth/right_develop.sql @@ -0,0 +1,10 @@ +-- @tag: right_develop +-- @description: Recht für Entwickler +-- @depends: release_3_5_7 +-- @locales: See various menu entries intended for developers + +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position + 20 FROM auth.master_rights WHERE name = 'admin'), + 'developer', + 'See various menu entries intended for developers', + FALSE);