Commit 8bc73d5d authored by Benjamin Rokseth's avatar Benjamin Rokseth
Browse files

koha: respect change branch param

parent a7640a98
...@@ -161,15 +161,14 @@ sub templateAndPermissions { ...@@ -161,15 +161,14 @@ sub templateAndPermissions {
# Use new auth object # Use new auth object
my $auth = $self->{session}->get("auth"); my $auth = $self->{session}->get("auth");
my $branch = $auth->{user}->{branchcode} || $self->{session}->param("branchname"); my $branch = $self->{session}->param("branchname") || $auth->{user}->{branchcode}; # session param overrides stored branch
my $userid = $auth->{user}->{userid} || $self->{session}->param("userid"); my $userid = $self->{session}->param("userid") || $auth->{user}->{userid}; # session param overrides stored userid
my $flags = $in->{flagsrequired}; my $flags = $in->{flagsrequired};
use Data::Dumper; warn Dumper($auth); use Data::Dumper; warn Dumper($auth);
my $info = {}; my $info = {};
# admins have 'id' set, not 'userid' # no session - present login page (admins have 'id' set, not 'userid' - TODO fix)
# no login - present login page
if (not $userid and not $self->{session}->param("id") and !$in->{authnotrequired}) { if (not $userid and not $self->{session}->param("id") and !$in->{authnotrequired}) {
my $auth_template = "auth.tt"; my $auth_template = "auth.tt";
my $template = C4::Templates::gettemplate( $auth_template, $in->{type}, $self); my $template = C4::Templates::gettemplate( $auth_template, $in->{type}, $self);
......
Markdown is supported
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