Bug 20383: Hide link to plugin management if plugins are not enabled
authorOwen Leonard <oleonard@myacpl.org>
Tue, 13 Mar 2018 10:15:31 +0000 (10:15 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 19 Mar 2018 16:55:53 +0000 (13:55 -0300)
commite7b004689c901af68d65bda6b36054b4242ef6e9
tree2bf8e763df78b9be92dd7f1a2c50b305579270a5
parent246746759afd39a4bf67aca9fc944b4659fb740d
Bug 20383: Hide link to plugin management if plugins are not enabled

This patch adds a check in admin-home.pl to see whether plugins are
enabled. If plugins are disabled, the link to plugins management is
hidden even if the user has plugin management permission.

To test, view the administration home page with plugins enabled and
disabled via the enable_plugins flag in the Koha configuration file.
Also test using users with different plugins permissions:

- Plugins enabled
  - CAN_user_plugins = 1
    -> Plugins link appears
  - CAN_user_plugins = 0
    -> Plugins link hidden

- Plugins disabled
  - CAN_user_plugins = 1,
  - CAN_user_plugins = 0
    -> Plugins link hidden

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
admin/admin-home.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt