aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Cobrand/Default.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2017-11-01 14:27:29 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-11-08 16:11:59 +0000
commit1fc77b834e03df20cc85efb1821e62b9a880ef14 (patch)
tree79f917d53b6e29ad3c3cb0d6cf37e28213d4e201 /perllib/FixMyStreet/Cobrand/Default.pm
parent1b6dca6afd96f508f93f77216c2afb7e6f8945c7 (diff)
Allow individual cobrands to disable Facebook/Twitter login
This means FB/Twitter login is disabled even if FACEBOOK_APP_ID/TWITTER_KEY are set.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/Default.pm')
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 2ee259b62..68d11f227 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -1244,6 +1244,10 @@ admin.
sub allow_report_extra_fields { 0 }
-
+sub social_auth_enabled {
+ my $self = shift;
+ my $key_present = FixMyStreet->config('FACEBOOK_APP_ID') or FixMyStreet->config('TWITTER_KEY');
+ return $key_present && !$self->call_hook("social_auth_disabled");
+}
1;