summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/GitHubAuth/Extension.pm9
-rw-r--r--extensions/Persona/Extension.pm9
2 files changed, 18 insertions, 0 deletions
diff --git a/extensions/GitHubAuth/Extension.pm b/extensions/GitHubAuth/Extension.pm
index dee927165..d68934be4 100644
--- a/extensions/GitHubAuth/Extension.pm
+++ b/extensions/GitHubAuth/Extension.pm
@@ -54,6 +54,15 @@ sub template_before_create {
};
}
+sub attachment_should_redirect_login {
+ my ($self, $args) = @_;
+ my $cgi = Bugzilla->cgi;
+
+ if ($cgi->param('github_state') || $cgi->param('github_email')) {
+ ${$args->{do_redirect}} = 1;
+ }
+}
+
sub auth_login_methods {
my ($self, $args) = @_;
my $modules = $args->{'modules'};
diff --git a/extensions/Persona/Extension.pm b/extensions/Persona/Extension.pm
index f288702e8..2c8e46add 100644
--- a/extensions/Persona/Extension.pm
+++ b/extensions/Persona/Extension.pm
@@ -64,6 +64,15 @@ sub config_modify_panels {
}
}
+sub attachment_should_redirect_login {
+ my ($self, $args) = @_;
+ my $cgi = Bugzilla->cgi;
+
+ if ($cgi->param("persona_assertion")) {
+ ${$args->{do_redirect}} = 1;
+ }
+}
+
sub config_add_panels {
my ($self, $args) = @_;
my $modules = $args->{panel_modules};