diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-01-13 10:58:04 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-01-31 10:46:55 +0000 |
commit | 113f06353a62128b878bfb8dcfa99d15cd9b7ecb (patch) | |
tree | ea29e42171903f0403cebcf40fd7752e8d44a68b | |
parent | c6992034cdbfdac30fb5704247585e294bba3566 (diff) |
Default logging to logged in user.
Historically, the FixMyStreet admin was accessed via HTTP Basic Auth and
a secure proxy, so the auth user was used for logging purposes. Nowadays
all admin use is by FixMyStreet user, and any Basic Auth is used for the
purpose of hiding staging sites from bots. This configuration means that
on those staging sites, all admin is logged by the one staging user, not
the actual user, so let's swap that round.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index c1afccdfd..047d15fe3 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -369,8 +369,8 @@ sub set_allowed_pages : Private { sub get_user : Private { my ( $self, $c ) = @_; - my $user = $c->req->remote_user(); - $user ||= ($c->user && $c->user->name); + my $user = ($c->user && $c->user->name); + $user ||= $c->req->remote_user(); $user ||= ''; return $user; |