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
65a0d96a
Commit
65a0d96a
authored
Jan 22, 2019
by
Petter Goksøyr Åsen
Browse files
koha: make LoginBranchcode available to templates
This fixes adding internal patron messages
parent
30ca57c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
koha/Deichman/Auth.pm
View file @
65a0d96a
...
...
@@ -190,16 +190,17 @@ sub templateAndPermissions {
# );
#}
$self
->
setTemplatePermissions
(
$template
,
$auth
,
$branch
);
$self
->
setTemplatePermissions
(
$template
,
$auth
,
$branch
,
$auth
->
{
user
}
->
{
branchcode
}
);
$self
->
setCustomTemplateParams
(
$template
);
# Various overrides from previous C4::Auth::get_template_and_user
return
$template
;
}
# set template permissions from auth object
sub
setTemplatePermissions
{
my
(
$self
,
$template
,
$auth
,
$branch
)
=
@_
;
my
(
$self
,
$template
,
$auth
,
$branch
name
,
$branchcode
)
=
@_
;
$template
->
param
(
LoginBranchname
=>
$branch
);
$template
->
param
(
LoginBranchname
=>
$branchname
);
$template
->
param
(
LoginBranchcode
=>
$branchcode
);
my
$id
=
$self
->
{
session
}
->
get
("
id
");
if
(
$self
->
{
session
}
->
get
("
admin
"))
{
# Admin user login should be removed!
...
...
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