Initial Version
This commit is contained in:
112
core/lib/Module/Module.php
Normal file
112
core/lib/Module/Module.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
namespace KTXC\Module;
|
||||
|
||||
use KTXF\Module\ModuleBrowserInterface;
|
||||
use KTXF\Module\ModuleConsoleInterface;
|
||||
use KTXF\Module\ModuleInstanceAbstract;
|
||||
|
||||
/**
|
||||
* Core Module
|
||||
*
|
||||
* Provides core system functionality and permissions
|
||||
*/
|
||||
class Module extends ModuleInstanceAbstract implements ModuleConsoleInterface, ModuleBrowserInterface
|
||||
{
|
||||
public function __construct() {}
|
||||
|
||||
public function handle(): string
|
||||
{
|
||||
return 'core';
|
||||
}
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return 'Core System';
|
||||
}
|
||||
|
||||
public function author(): string
|
||||
{
|
||||
return 'Ktrix';
|
||||
}
|
||||
|
||||
public function description(): string
|
||||
{
|
||||
return 'Core system functionality and user features';
|
||||
}
|
||||
|
||||
public function version(): string
|
||||
{
|
||||
return '0.0.1';
|
||||
}
|
||||
|
||||
public function permissions(): array
|
||||
{
|
||||
return [
|
||||
// Core User Permissions
|
||||
'user.profile.read' => [
|
||||
'label' => 'Read Own Profile',
|
||||
'description' => 'View own user profile information',
|
||||
'group' => 'User Profile'
|
||||
],
|
||||
'user.profile.update' => [
|
||||
'label' => 'Update Own Profile',
|
||||
'description' => 'Edit own user profile information',
|
||||
'group' => 'User Profile'
|
||||
],
|
||||
'user.settings.read' => [
|
||||
'label' => 'Read Own Settings',
|
||||
'description' => 'View own user settings',
|
||||
'group' => 'User Settings'
|
||||
],
|
||||
'user.settings.update' => [
|
||||
'label' => 'Update Own Settings',
|
||||
'description' => 'Edit own user settings',
|
||||
'group' => 'User Settings'
|
||||
],
|
||||
|
||||
// Module Management
|
||||
'module_manager.modules.view' => [
|
||||
'label' => 'View Modules',
|
||||
'description' => 'View list of installed and available modules',
|
||||
'group' => 'Module Management'
|
||||
],
|
||||
'module_manager.modules.manage' => [
|
||||
'label' => 'Manage Modules',
|
||||
'description' => 'Install, uninstall, enable, and disable modules',
|
||||
'group' => 'Module Management'
|
||||
],
|
||||
'module_manager.modules.*' => [
|
||||
'label' => 'Full Module Management',
|
||||
'description' => 'All module management operations',
|
||||
'group' => 'Module Management'
|
||||
],
|
||||
|
||||
// System Administration
|
||||
'system.admin' => [
|
||||
'label' => 'System Administrator',
|
||||
'description' => 'Full system access (superuser)',
|
||||
'group' => 'System Administration'
|
||||
],
|
||||
'*' => [
|
||||
'label' => 'All Permissions',
|
||||
'description' => 'Grants access to all features and operations',
|
||||
'group' => 'System Administration'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function registerCI(): array
|
||||
{
|
||||
return [
|
||||
\KTXC\Console\ModuleListCommand::class,
|
||||
\KTXC\Console\ModuleEnableCommand::class,
|
||||
\KTXC\Console\ModuleDisableCommand::class,
|
||||
];
|
||||
}
|
||||
|
||||
public function registerBI(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user