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

(-)a/admin/admin-home.pl (+7 lines)
Lines 35-40 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
35
    }
35
    }
36
);
36
);
37
37
38
if ( C4::Context->config('enable_plugins') ) {
39
    my @admin_plugins = Koha::Plugins->new()->GetPlugins({
40
        method => 'admin',
41
    });
42
    $template->param( admin_plugins => \@admin_plugins );
43
}
44
38
$template->param( mana_url        => $mana_url, );
45
$template->param( mana_url        => $mana_url, );
39
46
40
output_html_with_http_headers $query, $cookie, $template->output;
47
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/installer/data/mysql/atomicupdate/bug_36206.pl (+20 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "32602",
5
    description => "Add administrative plugins type",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        my $permission_added = $dbh->do(
11
            q{
12
            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 19, 'admin', 'Use administrative plugins');
13
        }
14
        );
15
16
        if ( $permission_added == 1 ) {
17
            say $out "Added new permission 'edit_any_item'";
18
        }
19
    },
20
};
(-)a/installer/data/mysql/mandatory/userpermissions.sql (+1 lines)
Lines 138-143 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
138
   (19, 'manage', 'Manage plugins ( install / uninstall )'),
138
   (19, 'manage', 'Manage plugins ( install / uninstall )'),
139
   (19, 'tool', 'Use tool plugins'),
139
   (19, 'tool', 'Use tool plugins'),
140
   (19, 'report', 'Use report plugins'),
140
   (19, 'report', 'Use report plugins'),
141
   (19, 'admin', 'Use administrative plugins'),
141
   (19, 'configure', 'Configure plugins'),
142
   (19, 'configure', 'Configure plugins'),
142
   (20, 'delete_public_lists', 'Delete public lists'),
143
   (20, 'delete_public_lists', 'Delete public lists'),
143
   (20, 'edit_public_lists', 'Edit public lists'),
144
   (20, 'edit_public_lists', 'Edit public lists'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+5 lines)
Lines 737-742 Link Here
737
            Use tool plugins
737
            Use tool plugins
738
        </span>
738
        </span>
739
        <span class="permissioncode">([% name | html %])</span>
739
        <span class="permissioncode">([% name | html %])</span>
740
    [%- CASE 'admin' -%]
741
        <span class="sub_permission admin_subpermission">
742
            Use adminitstrative plugins
743
        </span>
744
        <span class="permissioncode">([% name | html %])</span>
740
    [%- CASE 'delete_public_lists' -%]
745
    [%- CASE 'delete_public_lists' -%]
741
        <span class="sub_permission delete_public_lists_subpermission">
746
        <span class="sub_permission delete_public_lists_subpermission">
742
            Delete public lists
747
            Delete public lists
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt (-1 / +6 lines)
Lines 153-158 Link Here
153
                <dl>
153
                <dl>
154
                    <dt><a href="/cgi-bin/koha/plugins/plugins-home.pl">Manage plugins</a></dt>
154
                    <dt><a href="/cgi-bin/koha/plugins/plugins-home.pl">Manage plugins</a></dt>
155
                    <dd>View, manage, configure and run plugins.</dd>
155
                    <dd>View, manage, configure and run plugins.</dd>
156
                    [% IF ( CAN_user_plugins_admin && admin_plugins ) %]
157
                        [% FOREACH plugin IN admin_plugins %]
158
                        <dt><a href="/cgi-bin/koha/plugins/run.pl?class=[% plugin.class | uri %]&method=admin"><span class="plugin_name">[% plugin.metadata.name | html %]</span></a></dt>
159
                        <dd>[% plugin.metadata.description | html %]</dd>                                        
160
                        [% END %]
161
                    [% END %]
156
                </dl>
162
                </dl>
157
            [% END %]
163
            [% END %]
158
164
159
- 

Return to bug 36206