Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
8ab002c0
Commit
8ab002c0
authored
Sep 28, 2017
by
IKEDA Soji
Browse files
[bug] "sympa.pl --change_user_email" was broken on 6.2.20.
Fixed by reimplement it using Sympa::Request framework.
parent
ce1f94d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa/Spindle/AuthorizeRequest.pm
View file @
8ab002c0
...
...
@@ -45,7 +45,8 @@ sub _twist {
my
$request
=
shift
;
# Skip authorization unless specific scenario is defined.
if
(
$request
->
{
error
}
or
not
$request
->
handler
->
action_scenario
)
{
if
(
$request
->
{
error
}
or
not
$request
->
handler
->
action_scenario
or
(
$self
->
{
scenario_context
}
and
$self
->
{
scenario_context
}{
skip
}))
{
return
['
Sympa::Spindle::DispatchRequest
'];
}
...
...
src/sbin/sympa.pl.in
View file @
8ab002c0
...
...
@@ -50,6 +50,7 @@ use Sympa::List;
use
Sympa::
Log
;
use
Sympa::
Mailer
;
use
Sympa::Spindle::
ProcessDigest
;
use
Sympa::Spindle::
ProcessRequest
;
use
Sympa::Tools::
Data
;
use
Sympa::Tools::
File
;
use
Sympa::
Upgrade
;
...
...
@@ -502,22 +503,18 @@ if ($main::options{'dump'}) {
foreach
my
$robot
(
Sympa::List::
get_robots
())
{
printf
STDOUT
"
Doing processing for virtual robot %s...
\n
",
$robot
;
my
(
$status
,
$failed_for
)
=
Sympa::Admin::
change_user_email
(
my
$spindle
=
Sympa::Spindle::
ProcessRequest
->
new
(
context
=>
$robot
,
action
=>
'
move_user
',
current_email
=>
$
main::
options
{'
current_email
'},
new_email
=>
$
main::
options
{'
new_email
'},
robot
=>
$robot
email
=>
$
main::
options
{'
new_email
'},
sender
=>
Sympa::
get_address
('
*
',
'
listmaster
'),
scenario_context
=>
{
skip
=>
1
},
);
unless
(
defined
$status
)
{
unless
(
$spindle
and
$spindle
->
spin
)
{
printf
STDERR
"
Failed to change user email address in virtual robot %s
'}
\n
"
,
'
Failed to change user email address in virtual robot %s\n
'
,
$robot
;
exit
1
;
}
foreach
my
$failed_list
(
@$failed_for
)
{
printf
STDERR
"
Failed to change user email address for list %s'}
\n
",
$failed_list
->
{'
name
'};
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment