Initial commit
This commit is contained in:
114
lib/Module.php
Normal file
114
lib/Module.php
Normal file
@@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
namespace KTXM\UserManager;
|
||||
|
||||
use KTXF\Module\ModuleBrowserInterface;
|
||||
use KTXF\Module\ModuleInstanceAbstract;
|
||||
|
||||
/**
|
||||
* User Manager Module
|
||||
*/
|
||||
class Module extends ModuleInstanceAbstract implements ModuleBrowserInterface
|
||||
{
|
||||
public function __construct()
|
||||
{}
|
||||
|
||||
public function handle(): string
|
||||
{
|
||||
return 'user_manager';
|
||||
}
|
||||
|
||||
public function label(): string
|
||||
{
|
||||
return 'User Manager';
|
||||
}
|
||||
|
||||
public function author(): string
|
||||
{
|
||||
return 'Ktrix';
|
||||
}
|
||||
|
||||
public function description(): string
|
||||
{
|
||||
return 'Administrative user account and role management interface.';
|
||||
}
|
||||
|
||||
public function version(): string
|
||||
{
|
||||
return '0.0.1';
|
||||
}
|
||||
|
||||
public function permissions(): array
|
||||
{
|
||||
return [
|
||||
// Module Permission
|
||||
'user_manager' => [
|
||||
'label' => 'Access User Manager',
|
||||
'description' => 'View and access the user manager module',
|
||||
'group' => 'User Management'
|
||||
],
|
||||
|
||||
// User Account Management Permissions
|
||||
'user_manager.user.view' => [
|
||||
'label' => 'View Users',
|
||||
'description' => 'View user list and user details',
|
||||
'group' => 'User Account Management'
|
||||
],
|
||||
'user_manager.user.create' => [
|
||||
'label' => 'Create Users',
|
||||
'description' => 'Create new user accounts',
|
||||
'group' => 'User Account Management'
|
||||
],
|
||||
'user_manager.user.edit' => [
|
||||
'label' => 'Edit Users',
|
||||
'description' => 'Edit user details and settings',
|
||||
'group' => 'User Account Management'
|
||||
],
|
||||
'user_manager.user.delete' => [
|
||||
'label' => 'Delete Users',
|
||||
'description' => 'Delete user accounts',
|
||||
'group' => 'User Account Management'
|
||||
],
|
||||
'user_manager.user.*' => [
|
||||
'label' => 'Full User Management',
|
||||
'description' => 'All user management operations',
|
||||
'group' => 'User Account Management'
|
||||
],
|
||||
|
||||
// User Role Management Permissions
|
||||
'user_manager.role.view' => [
|
||||
'label' => 'View Roles',
|
||||
'description' => 'View role list and role details',
|
||||
'group' => 'User Role Management'
|
||||
],
|
||||
'user_manager.role.manage' => [
|
||||
'label' => 'Manage Roles',
|
||||
'description' => 'Create, edit, and delete roles',
|
||||
'group' => 'User Role Management'
|
||||
],
|
||||
'user_manager.role.assign' => [
|
||||
'label' => 'Assign Roles',
|
||||
'description' => 'Assign roles to users',
|
||||
'group' => 'User Role Management'
|
||||
],
|
||||
'user_manager.role.*' => [
|
||||
'label' => 'Full Role Management',
|
||||
'description' => 'All role management operations',
|
||||
'group' => 'User Role Management'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function registerBI(): array
|
||||
{
|
||||
return [
|
||||
'handle' => $this->handle(),
|
||||
'namespace' => 'UserManager',
|
||||
'version' => $this->version(),
|
||||
'label' => $this->label(),
|
||||
'author' => $this->author(),
|
||||
'description' => $this->description(),
|
||||
'boot' => 'static/module.mjs',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user