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

(-)a/installer/data/mysql/atomicupdate/bug_23321_permissions.perl (+18 lines)
Line 0 Link Here
1
$DBversion = 'XXX';    # will be replaced by the RM
2
if ( CheckVersion($DBversion) ) {
3
4
    $dbh->do(qq{
5
        INSERT IGNORE INTO `userflags` (`bit`, `flag`, `flagdesc`, `defaulton`)
6
        VALUES (25, 'cash_management', 'Cash management', 0)
7
    });
8
9
    $dbh->do(qq{
10
        INSERT IGNORE permissions (module_bit, code, description)
11
        VALUES
12
        (25, 'manage_cash_registers', 'Add and remove cash registers')
13
    });
14
15
16
    SetVersion($DBversion);
17
    print "Upgrade to $DBversion done (Bug 23321 - Add cash register permissions)\n";
18
}
(-)a/installer/data/mysql/userflags.sql (-1 / +2 lines)
Lines 20-24 INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES Link Here
20
(21, 'clubs', 'Patron clubs', '0'),
20
(21, 'clubs', 'Patron clubs', '0'),
21
(22,'ill','The Interlibrary Loans Module',0),
21
(22,'ill','The Interlibrary Loans Module',0),
22
(23,'self_check','Self check modules',0),
22
(23,'self_check','Self check modules',0),
23
(24, 'stockrotation', 'Manage stockrotation operations', 0)
23
(24, 'stockrotation', 'Manage stockrotation operations', 0),
24
(25, 'cash_management', 'Cash management', 0)
24
;
25
;
(-)a/installer/data/mysql/userpermissions.sql (-1 / +2 lines)
Lines 116-120 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
116
   (23, 'self_checkin_module', 'Log into the self check-in module'),
116
   (23, 'self_checkin_module', 'Log into the self check-in module'),
117
   (23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID'),
117
   (23, 'self_checkout_module', 'Perform self checkout at the OPAC. It should be used for the patron matching the AutoSelfCheckID'),
118
   (24, 'manage_rotas', 'Create, edit and delete rotas'),
118
   (24, 'manage_rotas', 'Create, edit and delete rotas'),
119
   (24, 'manage_rota_items', 'Add and remove items from rotas')
119
   (24, 'manage_rota_items', 'Add and remove items from rotas'),
120
   (25, 'manage_cash_registers', 'Add and remove cash registers')
120
;
121
;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+9 lines)
Lines 66-71 Link Here
66
    [%- CASE 'stockrotation' -%]
66
    [%- CASE 'stockrotation' -%]
67
        <span class="main_permission self_check_permission">Manage stockrotation operations</span>
67
        <span class="main_permission self_check_permission">Manage stockrotation operations</span>
68
        <span class="permissioncode">([% name | html %])</span>
68
        <span class="permissioncode">([% name | html %])</span>
69
    [%- CASE 'cash_management' -%]
70
        <span class="main_permission cash_management_permission">Cash management</span>
71
        <span class="permissioncode">([% name | html %])</span>
69
    [%- END -%]
72
    [%- END -%]
70
[%- END -%]
73
[%- END -%]
71
74
Lines 667-671 Link Here
667
            Create, edit and delete rotas
670
            Create, edit and delete rotas
668
        </span>
671
        </span>
669
        <span class="permissioncode">([% name | html %])</span>
672
        <span class="permissioncode">([% name | html %])</span>
673
  [%# cash_management %]
674
    [%- CASE 'manage_cash_registers' -%]
675
        <span class="sub_permission manage_cash_registers_subpermission">
676
            Add, edit and archive cash registers
677
        </span>
678
        <span class="permissioncode">([% name | html %])</span>
670
  [%- END -%]
679
  [%- END -%]
671
[%- END -%]
680
[%- END -%]
(-)a/members/member-flags.pl (-1 / +1 lines)
Lines 178-183 if ($input->param('newflags')) { Link Here
178
        if ($#sub_perm_loop > -1) {
178
        if ($#sub_perm_loop > -1) {
179
            $row{sub_perm_loop} = \@sub_perm_loop;
179
            $row{sub_perm_loop} = \@sub_perm_loop;
180
        }
180
        }
181
        next if ( ( $row{flag} eq 'cash_management' ) && !C4::Context->preference('UseCashRegisters') );
181
        push @loop, \%row;
182
        push @loop, \%row;
182
    }
183
    }
183
184
184
- 

Return to bug 23321