View | Details | Raw Unified | Return to bug 30624
Collapse All | Expand All

(-)a/C4/Auth.pm (-2 / +2 lines)
Lines 1191-1200 sub checkauth { Link Here
1191
                    my $ip = $ENV{'REMOTE_ADDR'};
1191
                    my $ip = $ENV{'REMOTE_ADDR'};
1192
1192
1193
                    # if they specify at login, use that
1193
                    # if they specify at login, use that
1194
                    if ( $query->param('branch') ) {
1194
                    if ( $query->param('branch') && ( haspermission($userid, { parameters => 'select_loggedin_library' }) || $flags->{superlibrarian}) ) {
1195
                        $branchcode = $query->param('branch');
1195
                        $branchcode = $query->param('branch');
1196
                        my $library = Koha::Libraries->find($branchcode);
1196
                        my $library = Koha::Libraries->find($branchcode);
1197
                        $branchname = $library? $library->branchname: '';
1197
                        $branchname = $library ? $library->branchname: '';
1198
                    }
1198
                    }
1199
                    if ( $query->param('desk_id') ) {
1199
                    if ( $query->param('desk_id') ) {
1200
                        $desk_id = $query->param('desk_id');
1200
                        $desk_id = $query->param('desk_id');
(-)a/installer/data/mysql/mandatory/userpermissions.sql (+1 lines)
Lines 37-42 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
37
   ( 3, 'manage_keyboard_shortcuts', 'Manage keyboard shortcuts for the advanced cataloging editor'),
37
   ( 3, 'manage_keyboard_shortcuts', 'Manage keyboard shortcuts for the advanced cataloging editor'),
38
   ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'),
38
   ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'),
39
   ( 3, 'manage_background_jobs', 'Manage background jobs'),
39
   ( 3, 'manage_background_jobs', 'Manage background jobs'),
40
   ( 3, 'select_loggedin_library' , 'Allow user to change logged in library'),
40
   ( 4, 'delete_borrowers', 'Delete patrons'),
41
   ( 4, 'delete_borrowers', 'Delete patrons'),
41
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
42
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
42
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
43
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc (-1 / +1 lines)
Lines 15-21 Link Here
15
            [% IF !Koha.Preference('IndependentBranchesTransfers') || CAN_user_superlibrarian %]
15
            [% IF !Koha.Preference('IndependentBranchesTransfers') || CAN_user_superlibrarian %]
16
                <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
16
                <li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
17
            [% END %]
17
            [% END %]
18
            [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %]
18
            [% IF ( CAN_user_parameters_select_loggedin_library ) %]
19
                [% IF Koha.Preference('UseCirculationDesks') %]
19
                [% IF Koha.Preference('UseCirculationDesks') %]
20
                <li><a href="/cgi-bin/koha/circ/set-library.pl">Set library and desk</a></li>
20
                <li><a href="/cgi-bin/koha/circ/set-library.pl">Set library and desk</a></li>
21
                [% ELSE %]
21
                [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc (-1 / +1 lines)
Lines 149-155 Link Here
149
                        </li>
149
                        </li>
150
                    [% END %]
150
                    [% END %]
151
151
152
                    [% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %]
152
                    [% IF ( CAN_user_parameters_select_loggedin_library ) %]
153
                    <li role="separator" class="loggedin-menu-label divider"></li>
153
                    <li role="separator" class="loggedin-menu-label divider"></li>
154
                    <li>
154
                    <li>
155
                        [% IF Koha.Preference('UseCirculationDesks') && Koha.Preference('UseCashRegisters') %]
155
                        [% IF Koha.Preference('UseCirculationDesks') && Koha.Preference('UseCashRegisters') %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+5 lines)
Lines 118-123 Link Here
118
            Manage account debit and credit types
118
            Manage account debit and credit types
119
        </span>
119
        </span>
120
        <span class="permissioncode">([% name | html %])</span>
120
        <span class="permissioncode">([% name | html %])</span>
121
    [%- CASE 'select_loggedin_library' -%]
122
        <span class="sub_permission manage_accounts_subpermission">
123
            Allow user to change logged in library
124
        </span>
125
        <span class="permissioncode">([% name | html %])</span>
121
    [%- CASE 'manage_circ_rules' -%]
126
    [%- CASE 'manage_circ_rules' -%]
122
        <span class="sub_permission manage_circ_rules_subpermission">
127
        <span class="sub_permission manage_circ_rules_subpermission">
123
            Manage circulation rules
128
            Manage circulation rules
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt (-7 / +9 lines)
Lines 42-54 Link Here
42
                        <a class="circ-button" href="/cgi-bin/koha/circ/renew.pl"><i class="fa fa-retweet"></i> Renew</a>
42
                        <a class="circ-button" href="/cgi-bin/koha/circ/renew.pl"><i class="fa fa-retweet"></i> Renew</a>
43
                    </li>
43
                    </li>
44
                    [% UNLESS IndependentBranches %]
44
                    [% UNLESS IndependentBranches %]
45
                        <li>
45
                        [% IF ( CAN_user_parameters_select_loggedin_library ) %]
46
                            [% IF Koha.Preference('UseCirculationDesks') %]
46
                            <li>
47
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library and desk</a>
47
                                [% IF Koha.Preference('UseCirculationDesks') %]
48
                            [% ELSE %]
48
                                <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library and desk</a>
49
                            <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library</a>
49
                                [% ELSE %]
50
                            [% END %]
50
                                <a class="circ-button" href="/cgi-bin/koha/circ/set-library.pl"><i class="fa fa-home"></i> Set library</a>
51
                        </li>
51
                                [% END %]
52
                            </li>
53
                        [% END %]
52
                    [% END %]
54
                    [% END %]
53
                    [% IF ( fast_cataloging ) %]
55
                    [% IF ( fast_cataloging ) %]
54
                        [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
56
                        [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt (-4 / +2 lines)
Lines 39-45 Link Here
39
        <div class="col-sm-12">
39
        <div class="col-sm-12">
40
            <main>
40
            <main>
41
                <div class="row">
41
                <div class="row">
42
43
                [% IF Koha.Preference('CircSidebar') %]
42
                [% IF Koha.Preference('CircSidebar') %]
44
                    <div class="col-sm-10 col-sm-push-2">
43
                    <div class="col-sm-10 col-sm-push-2">
45
                    <h1>Set library</h1>
44
                    <h1>Set library</h1>
Lines 81-93 Updated:<ul> Link Here
81
[% ELSE %]
80
[% ELSE %]
82
81
83
<form method="post" action="set-library.pl">
82
<form method="post" action="set-library.pl">
84
[% IF !( Koha.Preference('IndependentBranches') && !CAN_user_superlibrarian && !CAN_user_editcatalogue_edit_catalogue ) %]
83
[% IF  ( CAN_user_parameters_select_loggedin_library ) %]
85
<fieldset class="rows">
84
<fieldset class="rows">
86
    <legend>Set library</legend>
85
    <legend>Set library</legend>
87
    <ol>
86
    <ol>
88
        <li><label for="branch">Choose library:</label>
87
        <li><label for="branch">Choose library:</label>
89
        <select name="branch" id="branch">
88
        <select name="branch" id="branch">
90
            [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
89
            [% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %]
91
        </select></li>
90
        </select></li>
92
    </ol>
91
    </ol>
93
</fieldset>
92
</fieldset>
94
- 

Return to bug 30624