Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
digibib
deichman
Commits
8bc73d5d
Commit
8bc73d5d
authored
Dec 20, 2018
by
Benjamin Rokseth
Browse files
koha: respect change branch param
parent
a7640a98
Changes
1
Hide whitespace changes
Inline
Side-by-side
koha/Deichman/Auth.pm
View file @
8bc73d5d
...
...
@@ -161,15 +161,14 @@ sub templateAndPermissions {
# Use new auth object
my
$auth
=
$self
->
{
session
}
->
get
("
auth
");
my
$branch
=
$auth
->
{
user
}
->
{
branchcode
}
||
$self
->
{
session
}
->
param
("
branchname
");
my
$userid
=
$
auth
->
{
u
se
r
}
->
{
userid
}
||
$
self
->
{
session
}
->
param
("
userid
");
my
$branch
=
$self
->
{
session
}
->
param
("
branchname
")
||
$auth
->
{
user
}
->
{
branchcode
}
;
#
session
param
overrides stored branch
my
$userid
=
$
self
->
{
se
ssion
}
->
param
("
userid
")
||
$
auth
->
{
user
}
->
{
userid
};
#
session
param
overrides stored
userid
my
$flags
=
$in
->
{
flagsrequired
};
use
Data::
Dumper
;
warn
Dumper
(
$auth
);
my
$info
=
{};
# admins have 'id' set, not 'userid'
# no login - present login page
# no session - present login page (admins have 'id' set, not 'userid' - TODO fix)
if
(
not
$userid
and
not
$self
->
{
session
}
->
param
("
id
")
and
!
$in
->
{
authnotrequired
})
{
my
$auth_template
=
"
auth.tt
";
my
$template
=
C4::Templates::
gettemplate
(
$auth_template
,
$in
->
{
type
},
$self
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment