2026-03-19 19:04:28 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Console\Commands\Module;
|
|
|
|
|
|
|
|
|
|
use MintyPHP\Console\Command;
|
|
|
|
|
|
|
|
|
|
final class PermissionsSyncCommand extends Command
|
|
|
|
|
{
|
|
|
|
|
public function name(): string
|
|
|
|
|
{
|
|
|
|
|
return 'module:permissions-sync';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function description(): string
|
|
|
|
|
{
|
|
|
|
|
return 'Sync module permissions to DB and deactivate orphaned ones';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function execute(array $args, array $options): int
|
|
|
|
|
{
|
2026-03-19 19:16:36 +01:00
|
|
|
$this->requireBinScript('module-cli-bootstrap.php');
|
|
|
|
|
$this->requireBinScript('module-permissions-sync.php');
|
2026-03-19 19:04:28 +01:00
|
|
|
|
|
|
|
|
return modulePermissionsSyncRun();
|
|
|
|
|
}
|
|
|
|
|
}
|