Release 2.7.0 (#4506)
* added api URL for simpler integration * allow to request password change upon next login * make ModifiedAt timesheet independent * improved plugin api * replace kernel calls with AutoconfigureTag and TaggedIterator attributes * new translation keys (e.g. for days) * support setting min and max date on date and daterange pickers
This commit is contained in:
@@ -16,6 +16,7 @@ use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
||||
@@ -43,6 +44,7 @@ final class CreateUserCommand extends AbstractUserCommand
|
||||
User::DEFAULT_ROLE
|
||||
)
|
||||
->addArgument('password', InputArgument::OPTIONAL, 'Password for the new user (requested if not provided)')
|
||||
->addOption('request-password', null, InputOption::VALUE_NONE, 'The user needs to set a new password during next login')
|
||||
;
|
||||
}
|
||||
|
||||
@@ -69,6 +71,10 @@ final class CreateUserCommand extends AbstractUserCommand
|
||||
$user->setEnabled(true);
|
||||
$user->setRoles(explode(',', $role));
|
||||
|
||||
if ($input->getOption('request-password') === true) {
|
||||
$user->setRequiresPasswordReset(true);
|
||||
}
|
||||
|
||||
try {
|
||||
$this->userService->saveNewUser($user);
|
||||
$io->success(sprintf('Success! Created user: %s', $username));
|
||||
|
||||
@@ -48,16 +48,16 @@ final class PluginCommand extends Command
|
||||
|
||||
$rows = [];
|
||||
foreach ($plugins as $plugin) {
|
||||
$this->plugins->loadMetadata($plugin);
|
||||
$meta = $plugin->getMetadata();
|
||||
$rows[] = [
|
||||
$plugin->getId(),
|
||||
$plugin->getName(),
|
||||
$meta->getVersion(),
|
||||
$meta->getKimaiVersion(),
|
||||
$plugin->getPath(),
|
||||
];
|
||||
}
|
||||
$io->table(['Name', 'Version', 'Requires', 'Directory'], $rows);
|
||||
$io->table(['Id', 'Name', 'Version', 'Requires', 'Directory'], $rows);
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user