v0.9.6
This commit is contained in:
commit
1396974b03
286 files changed
+19411
No files matched your search
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace IriksIT\Manager\Modules\Settings;
|
||||
|
||||
use IriksIT\Manager\Modules\BaseModule;
|
||||
use IriksIT\Manager\Support\Names;
|
||||
use IriksIT\Manager\Support\Permission;
|
||||
|
||||
/**
|
||||
* The settings screen: which parts and features are on, and the keys and addresses of integrations, all changeable from the
|
||||
* manager by an account with the right, in the whole face of the manager only. A change is saved (secrets encrypted) and works at
|
||||
* once; see Support\Settings.
|
||||
*/
|
||||
class SettingsModule extends BaseModule
|
||||
{
|
||||
public function key(): string
|
||||
{
|
||||
return 'settings';
|
||||
}
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return 'Settings';
|
||||
}
|
||||
|
||||
public function enabledByDefault(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function tables(): array
|
||||
{
|
||||
return ['settings'];
|
||||
}
|
||||
|
||||
public function permissions(): array
|
||||
{
|
||||
return [
|
||||
new Permission('settings.manage', 'Switch parts and features on or off and change settings', 'Settings'),
|
||||
new Permission('settings.secrets', 'Change keys, passwords and addresses of integrations', 'Settings', needs: ['settings.manage']),
|
||||
];
|
||||
}
|
||||
|
||||
public function navigation(): array
|
||||
{
|
||||
return [['label' => 'Settings', 'section' => 'Administration', 'route' => Names::route('settings.index'), 'permission' => 'settings.manage', 'icon' => 'cog', 'simple' => false]];
|
||||
}
|
||||
|
||||
public function actions(): array
|
||||
{
|
||||
return ['settings.update' => ['Changed the settings'], 'settings.refresh' => ['Refreshed the settings'], 'settings.check' => ['Tried a connection of the settings']];
|
||||
}
|
||||
|
||||
public function views(): array
|
||||
{
|
||||
return ['settings.index' => 'Opened the settings'];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user