Bugzilla – Attachment 156737 Details for
Bug 25672
Administrators should be able to restrict client-side plugin upload to trusted sources
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25672: Prevent uninstall when plugin browser upload disabled
Bug-25672-Prevent-uninstall-when-plugin-browser-up.patch (text/plain), 2.69 KB, created by
Martin Renvoize (ashimema)
on 2023-10-09 11:44:06 UTC
(
hide
)
Description:
Bug 25672: Prevent uninstall when plugin browser upload disabled
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-10-09 11:44:06 UTC
Size:
2.69 KB
patch
obsolete
>From 42ba3138e832a5d8368ddf963a9d7e89e04258db Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 24 Jul 2023 06:17:13 +0000 >Subject: [PATCH] Bug 25672: Prevent uninstall when plugin browser upload > disabled > >When plugin browser upload is disabled, also prevent plugin browser >uninstall. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: David Cook <dcook@prosentient.com.au> >--- > .../intranet-tmpl/prog/en/modules/plugins/plugins-home.tt | 2 ++ > plugins/plugins-uninstall.pl | 5 ++++- > 2 files changed, 6 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >index aefd39d1e27..a703437b6ea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt >@@ -220,7 +220,9 @@ > [% END %] > [% END %] > [% IF ( CAN_user_plugins_manage ) %] >+ [% IF ( enable_browser_upload ) %] > <li><a class="uninstall_plugin" data-plugin-name="[% plugin.metadata.name | html %]" href="/cgi-bin/koha/plugins/plugins-uninstall.pl?class=[% plugin.class | html %]"><i class="fa fa-trash-can fa-fw"></i> Uninstall</a></li> >+ [% END %] > [% IF ( plugin.is_enabled ) %] > <li><a class="enable_plugin" data-plugin-name="[% plugin.metadata.name | html %]" href="/cgi-bin/koha/plugins/plugins-enable.pl?class=[% plugin.class | html %]&method=disable"><i class="fa fa-pause fa-fw"></i> Disable</a></li> > [% ELSE %] >diff --git a/plugins/plugins-uninstall.pl b/plugins/plugins-uninstall.pl >index d6a85d39d32..50ee3490c31 100755 >--- a/plugins/plugins-uninstall.pl >+++ b/plugins/plugins-uninstall.pl >@@ -38,8 +38,11 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > >+my $browser_upload_enabled = C4::Context->config('enable_plugin_browser_upload'); > my $class = $input->param('class'); > >-Koha::Plugins::Handler->delete( { class => $class } ); >+if ( $browser_upload_enabled && $class ) { >+ Koha::Plugins::Handler->delete( { class => $class } ); >+} > > print $input->redirect("/cgi-bin/koha/plugins/plugins-home.pl"); >-- >2.41.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25672
:
106651
|
106671
|
106673
|
106674
|
107172
|
107173
|
107174
|
153824
|
153825
|
153826
|
153827
|
153925
|
154423
|
154424
|
154425
|
154426
|
154427
|
154453
|
154455
|
154464
|
154465
|
154466
|
154467
|
154468
|
154474
|
154475
|
154476
|
154477
|
154478
|
156715
|
156716
|
156717
|
156718
|
156719
|
156720
|
156734
|
156735
|
156736
|
156737
|
156738
|
156739
|
156740
|
157730
|
157810
|
157811
|
157812
|
157813
|
157814
|
157815
|
157816
|
157817
|
157836
|
157837
|
157838
|
157839
|
157840
|
157841
|
157842
|
157843
|
157846
|
157847
|
157848
|
157849
|
157850
|
157851
|
157852
|
157853