You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class UpdateRolePermissionsCommand extends RequiresRepositoryCommand
12
+
{
13
+
protectedfunctionconfigure()
14
+
{
15
+
$this->setName('auth:update-role-permissions')
16
+
->setDescription('Updates Roles and Permissions according to a definitions specified in the application. Useful if the application does not allow users to customise role permissions.')
17
+
->addOption('f', null, null, 'Forces update - does not prompt user');
$output->writeln('<comment>Warning: New roles may be created, and all permissions associated with a role may be updated/removed if not specified in RolePermissionDefinitions.</comment>');
30
+
}
31
+
$verify = newQuestion(
32
+
'<question>Are you sure you want to proceed? [y/n] </question>'
33
+
);
34
+
$verify->setValidator(function ($value) use ($output) {
35
+
if (stripos($value, 'y') !== 0) {
36
+
$output->writeln('<error>Aborted</error>');
37
+
returnfalse;
38
+
}
39
+
returntrue;
40
+
});
41
+
if ($force || $helper->ask($input, $output, $verify)) {
42
+
if (!$force) {
43
+
$output->writeln('<comment>If you would like to suppress user verification in the future, use the --f option</comment>');
0 commit comments