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

(-)a/installer/data/mysql/atomicupdate/bug_40441.pl (+23 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "40441",
6
    description => "Add new permission for validation passwords on the API",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        # Do you stuffs here
12
        $dbh->do(
13
            q{
14
            INSERT IGNORE INTO permissions (module_bit, code, description)
15
            VALUES (4, 'api_validate_password', 'Validate patron passwords using the API')
16
        }
17
        );
18
19
        # permissions
20
        say_success( $out, "Added new permission 'borrowers:api_validate_password'" );
21
22
    },
23
};
(-)a/installer/data/mysql/mandatory/userpermissions.sql (+1 lines)
Lines 44-49 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
44
   ( 3, 'manage_search_filters', 'Manage custom search filters'),
44
   ( 3, 'manage_search_filters', 'Manage custom search filters'),
45
   ( 3, 'manage_identity_providers', 'Manage identity providers'),
45
   ( 3, 'manage_identity_providers', 'Manage identity providers'),
46
   ( 3, 'manage_record_sources', 'Manage record sources'),
46
   ( 3, 'manage_record_sources', 'Manage record sources'),
47
   ( 4, 'api_validate_password', 'Validate patron passwords using the API'),
47
   ( 4, 'delete_borrowers', 'Delete patrons'),
48
   ( 4, 'delete_borrowers', 'Delete patrons'),
48
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
49
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
49
   ( 4, 'list_borrowers', 'Search, list and view patrons'),
50
   ( 4, 'list_borrowers', 'Search, list and view patrons'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (-1 / +3 lines)
Lines 236-241 Link Here
236
            View patron infos from any libraries. If not set the logged in user could only access patron infos from its own library or group of libraries.
236
            View patron infos from any libraries. If not set the logged in user could only access patron infos from its own library or group of libraries.
237
        </span>
237
        </span>
238
        <span class="permissioncode">([% name | html %])</span>
238
        <span class="permissioncode">([% name | html %])</span>
239
    [%- CASE 'api_validate_password' -%]
240
        <span class="sub_permission api_validate_password_subpermission">Validate patron passwords using the API</span>
241
        <span class="permissioncode">([% name | html %])</span>
239
    [%- CASE 'send_messages_to_borrowers' -%]
242
    [%- CASE 'send_messages_to_borrowers' -%]
240
        <span class="sub_permission send_messages_to_borrowers_subpermission"> Send messages to patrons </span>
243
        <span class="sub_permission send_messages_to_borrowers_subpermission"> Send messages to patrons </span>
241
        <span class="permissioncode">([% name | html %])</span>
244
        <span class="permissioncode">([% name | html %])</span>
242
- 

Return to bug 40441