diff --git a/Plugin.php b/Plugin.php index bfcb4b3..7e95b83 100644 --- a/Plugin.php +++ b/Plugin.php @@ -1,39 +1,7 @@ - 'GusApi', - 'description' => 'Gus Api plugin for October CMS', - 'author' => 'Initbiz', - 'icon' => 'icon-leaf' - ]; - } +use System\Classes\PluginBase; - public function registerSettings() - { - return [ - 'gusapi' => [ - 'label' => 'initbiz.gusapi::lang.settings.menu_gusapi_label', - 'description' => 'initbiz.gusapi::lang.settings.menu_gusapi_description', - 'category' => 'initbiz.gusapi::lang.settings.menu_category', - 'icon' => 'icon-cubes', - 'class' => 'Initbiz\GusApi\Models\Settings', - 'order' => 100 - ] - ]; - } -} +class Plugin extends PluginBase {} diff --git a/lang/en/lang.php b/lang/en/lang.php index 30afe80..3dd30d3 100644 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -12,4 +12,8 @@ 'gus_api_key' => 'API Key', 'gus_api_key_comment' => 'Set your key here. By default the testing one is set: abcde12345abcde12345', ], + 'permissions' => [ + 'label' => 'Manage GUS Api', + 'tab' => 'GUS Api' + ], ]; diff --git a/lang/pl/lang.php b/lang/pl/lang.php index b907610..d87e29f 100644 --- a/lang/pl/lang.php +++ b/lang/pl/lang.php @@ -12,4 +12,8 @@ 'gus_api_key' => 'Klucz API', 'gus_api_key_comment' => 'Wpisz tutaj swój klucz. Domyślnie jest ustawiony testowy: abcde12345abcde12345', ], + 'permissions' => [ + 'label' => 'Zarządzaj GUS Api', + 'tab' => 'GUS Api' + ], ]; diff --git a/plugin.yaml b/plugin.yaml new file mode 100644 index 0000000..7d53e62 --- /dev/null +++ b/plugin.yaml @@ -0,0 +1,21 @@ +plugin: + name: 'initbiz.gusapi::lang.plugin.name' + description: 'initbiz.gusapi::lang.plugin.description' + author: Initbiz + icon: icon-leaf + +settings: + gusapi: + label: initbiz.gusapi::lang.settings.menu_gusapi_label + description: initbiz.gusapi::lang.settings.menu_gusapi_description + category: initbiz.gusapi::lang.settings.menu_category + icon: icon-cubes + class: Initbiz\GusApi\Models\Settings + order: 100 + permissions: + - initbiz.gusapi.settings_access_gusapi + +permissions: + initbiz.gusapi.settings_access_gusapi: + tab: initbiz.gusapi::lang.permissions.tab + label: initbiz.gusapi::lang.permissions.label \ No newline at end of file diff --git a/updates/version.yaml b/updates/version.yaml index 75b42a5..8ba1ffb 100644 --- a/updates/version.yaml +++ b/updates/version.yaml @@ -7,4 +7,6 @@ 1.0.4: - 'Fixed null key' 2.0.0: - - 'Update gusapi/gusapi package' \ No newline at end of file + - 'Update gusapi/gusapi package' +2.1.0: + - 'Add permissions' \ No newline at end of file