|
@@ -45,6 +45,12 @@ class ResetBeUserPermsCommand extends Command
|
|
|
null,
|
|
null,
|
|
|
InputOption::VALUE_NONE,
|
|
InputOption::VALUE_NONE,
|
|
|
"Reset all of the websites be_users permissions."
|
|
"Reset all of the websites be_users permissions."
|
|
|
|
|
+ )
|
|
|
|
|
+ ->addOption(
|
|
|
|
|
+ "create",
|
|
|
|
|
+ 'c',
|
|
|
|
|
+ InputOption::VALUE_NONE,
|
|
|
|
|
+ "Create the be_user and/or be_group when they are missing"
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -59,6 +65,7 @@ class ResetBeUserPermsCommand extends Command
|
|
|
{
|
|
{
|
|
|
$org_id = $input->getArgument('organization-id');
|
|
$org_id = $input->getArgument('organization-id');
|
|
|
$all = $input->getOption('all');
|
|
$all = $input->getOption('all');
|
|
|
|
|
+ $create = $input->getOption('create');
|
|
|
|
|
|
|
|
if ($all && $org_id) {
|
|
if ($all && $org_id) {
|
|
|
throw new \InvalidArgumentException("You can not pass both an organization id and the --all option");
|
|
throw new \InvalidArgumentException("You can not pass both an organization id and the --all option");
|
|
@@ -72,10 +79,10 @@ class ResetBeUserPermsCommand extends Command
|
|
|
$siteController = GeneralUtility::makeInstance(ObjectManager::class)->get(SiteController::class);
|
|
$siteController = GeneralUtility::makeInstance(ObjectManager::class)->get(SiteController::class);
|
|
|
|
|
|
|
|
if ($all) {
|
|
if ($all) {
|
|
|
- $siteController->resetAllBeUserPermsAction();
|
|
|
|
|
|
|
+ $siteController->resetAllBeUserPermsAction($create);
|
|
|
$io->success(sprintf("Be users permissions were reset for every website"));
|
|
$io->success(sprintf("Be users permissions were reset for every website"));
|
|
|
} else {
|
|
} else {
|
|
|
- $rootUid = $siteController->resetBeUserPermsAction($org_id);
|
|
|
|
|
|
|
+ $rootUid = $siteController->resetBeUserPermsAction($org_id, $create);
|
|
|
$io->success(sprintf("The website with root uid " . $rootUid . " had its be users permissions reset"));
|
|
$io->success(sprintf("The website with root uid " . $rootUid . " had its be users permissions reset"));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|