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

(-)a/installer/data/mysql/atomicupdate/bug_22868.perl (+19 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        INSERT IGNORE INTO `userflags` (`bit`, `flag`, `flagdesc`, `defaulton`)
5
        VALUES (12, 'suggestions', 'Suggestion management', 0)
6
    });
7
8
    $dbh->do(q{
9
        UPDATE permissions SET module_bit=12
10
        WHERE code="suggestions_manage"
11
    });
12
13
    $dbh->do(q{
14
        UPDATE borrowers SET flags = flags + (1<<12) WHERE flags & (1 << 11)
15
    });
16
17
    SetVersion( $DBversion );
18
    print "Upgrade to $DBversion done (Bug 22868 - Move suggestions_manage subpermission out of acquisition permission)\n";
19
}
(-)a/installer/data/mysql/userflags.sql (-1 / +2 lines)
Lines 8-14 INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES Link Here
8
(6,'reserveforothers','Place and modify holds for patrons',0),
8
(6,'reserveforothers','Place and modify holds for patrons',0),
9
(9,'editcatalogue','Edit catalog (Modify bibliographic/holdings data)',0),
9
(9,'editcatalogue','Edit catalog (Modify bibliographic/holdings data)',0),
10
(10,'updatecharges','Manage patrons fines and fees',0),
10
(10,'updatecharges','Manage patrons fines and fees',0),
11
(11,'acquisition','Acquisition and/or suggestion management',0),
11
(11,'acquisition','Acquisition management',0),
12
(12,'suggestions','Suggestion management',0),
12
(13,'tools','Use all tools (expand for granular tools permissions)',0),
13
(13,'tools','Use all tools (expand for granular tools permissions)',0),
13
(14,'editauthorities','Edit authorities',0),
14
(14,'editauthorities','Edit authorities',0),
14
(15,'serials','Manage serial subscriptions',0),
15
(15,'serials','Manage serial subscriptions',0),
(-)a/installer/data/mysql/userpermissions.sql (-1 / +1 lines)
Lines 49-55 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
49
   (10, 'writeoff', 'Write off fines and fees'),
49
   (10, 'writeoff', 'Write off fines and fees'),
50
   (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
50
   (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'),
51
   (11, 'currencies_manage', 'Manage currencies and exchange rates'),
51
   (11, 'currencies_manage', 'Manage currencies and exchange rates'),
52
   (11, 'suggestions_manage', 'Manage purchase suggestions'),
53
   (11, 'vendors_manage', 'Manage vendors'),
52
   (11, 'vendors_manage', 'Manage vendors'),
54
   (11, 'contracts_manage', 'Manage contracts'),
53
   (11, 'contracts_manage', 'Manage contracts'),
55
   (11, 'period_manage', 'Manage budgets'),
54
   (11, 'period_manage', 'Manage budgets'),
Lines 63-68 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
63
   (11, 'budget_add_del', 'Add and delete funds (but can''t modify funds)'),
62
   (11, 'budget_add_del', 'Add and delete funds (but can''t modify funds)'),
64
   (11, 'budget_manage_all', 'Manage all funds'),
63
   (11, 'budget_manage_all', 'Manage all funds'),
65
   (11, 'edi_manage', 'Manage EDIFACT transmissions'),
64
   (11, 'edi_manage', 'Manage EDIFACT transmissions'),
65
   (12, 'suggestions_manage', 'Manage purchase suggestions'),
66
   (13, 'edit_news', 'Write news for the OPAC and staff interfaces'),
66
   (13, 'edit_news', 'Write news for the OPAC and staff interfaces'),
67
   (13, 'label_creator', 'Create printable labels and barcodes from catalog and patron data'),
67
   (13, 'label_creator', 'Create printable labels and barcodes from catalog and patron data'),
68
   (13, 'edit_calendar', 'Define days when the library is closed'),
68
   (13, 'edit_calendar', 'Define days when the library is closed'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc (-1 / +1 lines)
Lines 4-10 Link Here
4
        <ul>
4
        <ul>
5
            <li><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions home</a></li>
5
            <li><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions home</a></li>
6
            [% IF ( CAN_user_acquisition_order_receive ) %]<li><a href="/cgi-bin/koha/acqui/lateorders.pl">Late orders</a></li>[% END %]
6
            [% IF ( CAN_user_acquisition_order_receive ) %]<li><a href="/cgi-bin/koha/acqui/lateorders.pl">Late orders</a></li>[% END %]
7
            [% IF ( suggestion && CAN_user_acquisition_suggestions_manage ) %]<li><a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a></li>[% END %]
7
            [% IF ( suggestion && CAN_user_suggestions_suggestions_manage ) %]<li><a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a></li>[% END %]
8
            <li><a href="/cgi-bin/koha/acqui/invoices.pl">Invoices</a></li>
8
            <li><a href="/cgi-bin/koha/acqui/invoices.pl">Invoices</a></li>
9
            [% IF CAN_user_acquisition_edi_manage %]
9
            [% IF CAN_user_acquisition_edi_manage %]
10
                <li><a href="/cgi-bin/koha/acqui/edifactmsgs.pl">EDIFACT messages</a></li>
10
                <li><a href="/cgi-bin/koha/acqui/edifactmsgs.pl">EDIFACT messages</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (-1 / +1 lines)
Lines 122-128 Link Here
122
        [% END %]
122
        [% END %]
123
    [% END %]
123
    [% END %]
124
124
125
    [% IF CAN_user_acquisition_suggestions_manage %]
125
    [% IF CAN_user_suggestions_suggestions_manage %]
126
        [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% patron.borrowernumber | uri %]">Purchase suggestions</a></li>
126
        [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% patron.borrowernumber | uri %]">Purchase suggestions</a></li>
127
    [% END %]
127
    [% END %]
128
    [% IF CAN_user_borrowers_edit_borrowers && useDischarge %]
128
    [% IF CAN_user_borrowers_edit_borrowers && useDischarge %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (-1 / +4 lines)
Lines 28-34 Link Here
28
        <span class="main_permission updatecharges_permission">Manage patrons fines and fees</span>
28
        <span class="main_permission updatecharges_permission">Manage patrons fines and fees</span>
29
        <span class="permissioncode">([% name | html %])</span>
29
        <span class="permissioncode">([% name | html %])</span>
30
    [%- CASE 'acquisition' -%]
30
    [%- CASE 'acquisition' -%]
31
        <span class="main_permission acquisition_permission">Acquisition and/or suggestion management</span>
31
        <span class="main_permission acquisition_permission">Acquisition management</span>
32
        <span class="permissioncode">([% name | html %])</span>
33
    [%- CASE 'suggestions' -%]
34
        <span class="main_permission suggestions_permission">Suggestions management</span>
32
        <span class="permissioncode">([% name | html %])</span>
35
        <span class="permissioncode">([% name | html %])</span>
33
    [%- CASE 'tools' -%]
36
    [%- CASE 'tools' -%]
34
        <span class="main_permission tools_permission">Use all tools (expand for granular tools permissions)</span>
37
        <span class="main_permission tools_permission">Use all tools (expand for granular tools permissions)</span>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-1 / +1 lines)
Lines 49-55 Link Here
49
</div>
49
</div>
50
</div>
50
</div>
51
51
52
[% IF ( CAN_user_acquisition_suggestions_manage && suggestion && suggestions_count ) %]
52
[% IF ( CAN_user_suggestions_suggestions_manage && suggestion && suggestions_count ) %]
53
<div class="col-sm-6">
53
<div class="col-sm-6">
54
    <div id="acqui_acqui_home_suggestions">
54
    <div id="acqui_acqui_home_suggestions">
55
        <fieldset>
55
        <fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (-1 / +1 lines)
Lines 144-150 Link Here
144
                                </div>
144
                                </div>
145
                                [% END %]
145
                                [% END %]
146
146
147
                                [% IF ( CAN_user_acquisition_suggestions_manage && pendingsuggestions ) %]
147
                                [% IF ( CAN_user_suggestions_suggestions_manage && pendingsuggestions ) %]
148
                                <div class="pending-info" id="suggestions_pending">
148
                                <div class="pending-info" id="suggestions_pending">
149
149
150
                                    <a href="/cgi-bin/koha/suggestion/suggestion.pl#ASKED">Suggestions pending approval</a>:
150
                                    <a href="/cgi-bin/koha/suggestion/suggestion.pl#ASKED">Suggestions pending approval</a>:
(-)a/members/purchase-suggestions.pl (-1 / +1 lines)
Lines 34-40 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
34
        query           => $input,
34
        query           => $input,
35
        type            => "intranet",
35
        type            => "intranet",
36
        authnotrequired => 0,
36
        authnotrequired => 0,
37
        flagsrequired   => { acquisition => 'suggestions_manage' },
37
        flagsrequired   => { suggestions => 'suggestions_manage' },
38
        debug           => 1,
38
        debug           => 1,
39
    }
39
    }
40
);
40
);
(-)a/suggestion/suggestion.pl (-2 / +1 lines)
Lines 112-118 my ( $template, $borrowernumber, $cookie, $userflags ) = get_template_and_user( Link Here
112
            template_name   => "suggestion/suggestion.tt",
112
            template_name   => "suggestion/suggestion.tt",
113
            query           => $input,
113
            query           => $input,
114
            type            => "intranet",
114
            type            => "intranet",
115
            flagsrequired   => { acquisition => 'suggestions_manage' },
115
            flagsrequired   => { suggestions => 'suggestions_manage' },
116
        }
116
        }
117
    );
117
    );
118
118
119
- 

Return to bug 22868