From d8907f11f5c255727b8a814746a0114e5c62e30a Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 4 May 2014 18:35:10 +0200 Subject: Support Google Apps authentication. --- www/common.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'www/common.pl') diff --git a/www/common.pl b/www/common.pl index aa86e47..3f3a5b0 100644 --- a/www/common.pl +++ b/www/common.pl @@ -6,6 +6,7 @@ use common::sense; use Modern::Perl; use Mail::ExpandAliases; +use URI; sub load_config() { $::MULKONF = { }; @@ -13,6 +14,8 @@ sub load_config() { } sub email_users($) { + return @_ + if $::MULKONF->{auth_type} eq 'google'; my ($email) = @_; my $alias; if ($email =~ /^(.*?)@/) { $alias = $1; } @@ -25,3 +28,13 @@ sub email_users($) { return ($alias); } } + +sub reluri($$) { + my ($cgi, $x) = @_; + my $uri = URI->new($cgi->url(-full=>1)); + my @path = $uri->path_segments; + pop @path; + push @path, $x; + $uri->path_segments(@path); + return "$uri"; +} -- cgit v1.2.3