Commit 2f614e46 authored by Kevin Falcone's avatar Kevin Falcone
Browse files

When user creation is blocked, we get a defined CurrentUser

RT-Authen-ExternalAuth can block user creation in the mailgate by
returning 0 from CanonicalizeUserInfo if the user doesn't exist in the
external system.  RT blindly assumes that
RT::Interface::Email::CreateUser will return a user, so it returns the
CurrentUser and 1 without checking to see if the creation was
successful.

This results in CommandByMail getting a defined but unloaded CurrentUser

Checking for the Id prevents later failures
parent 01320e4f
......@@ -148,7 +148,7 @@ sub GetCurrentUser {
@_
);
unless ( $args{'CurrentUser'} ) {
unless ( $args{'CurrentUser'} && $args{'CurrentUser'}->Id ) {
$RT::Logger->error(
"Filter::TakeAction executed when "
."CurrentUser (actor) is not authorized. "
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment