Bug 22198: Add granular permission setting for Mana KB
This patch adds a separate permission for managing Mana KB.
To test, apply the patch and update the database.
- Open the permissions page for a patron with staff client privileges
- Confirm that there is a "Manage Mana KB content sharing
(manage_mana)" permission.
- Leaving this new permission unchecked, log into the staff client
with as that patron and go to the Administration home page.
- The "Using Mana-KB" link should not appear.
- Navigate directly to /cgi-bin/koha/admin/share_content.pl. You
should get a "permission denied" message.
- Modify the patron's permissions to grant them access to Mana KB.
- Confirm that the link now appears on the Administration home
page and that the user can access the page.
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
1575d33962
commit
e142e85d65
|
|
@ -33,7 +33,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
|
|||
query => $query,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { parameters => '*' },
|
||||
flagsrequired => { parameters => 'manage_mana' },
|
||||
debug => 1,
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_mana', 'Manage Mana KB content sharing');
|
||||
|
|
@ -30,6 +30,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
|
|||
( 3, 'manage_sms_providers', 'Manage SMS cellular providers'),
|
||||
( 3, 'manage_audio_alerts', 'Manage audio alerts'),
|
||||
( 3, 'manage_usage_stats', 'Manage usage statistics settings'),
|
||||
( 3, 'manage_mana', 'Manage Mana KB content sharing'),
|
||||
( 4, 'edit_borrowers', 'Add, modify and view patron information'),
|
||||
( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
|
||||
( 6, 'place_holds', 'Place holds for patrons'),
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
[%- CASE 'manage_audio_alerts' -%]<span>Manage audio alerts</span>
|
||||
[%- CASE 'manage_sms_providers' -%]<span>Manage SMS cellular providers</span>
|
||||
[%- CASE 'manage_usage_stats' -%]<span>Manage usage statistics settings</span>
|
||||
[%- CASE 'manage_mana' -%]<span>Manage Mana KB content sharing</span>
|
||||
[%- CASE 'edit_borrowers' -%]<span>Add, modify and view patron information</span>
|
||||
[%- CASE 'view_borrower_infos_from_any_libraries' -%]<span>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.</span>
|
||||
[%- CASE 'modify_holds_priority' -%]<span>Modify holds priority</span>
|
||||
|
|
|
|||
|
|
@ -13,20 +13,22 @@
|
|||
<div class="main container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
|
||||
[% IF ( Koha.Preference('Mana') == 1) && !mana_url %]
|
||||
<div class="dialog message">
|
||||
<h4>The Mana Knowledge Base feature is enabled but not configured.</h4>
|
||||
<p>This feature allows you to retrieve and share data (subscription patterns and reports) with other Koha libaries.</p>
|
||||
<p>
|
||||
Ask your system administrator to configure this feature, or remove this note by <a href=/cgi-bin/koha/admin/share_content.pl>disabling the 'Mana' system preference</a>.
|
||||
</p>
|
||||
</div>
|
||||
[% END %]
|
||||
[% IF ( Koha.Preference('Mana') == 2 ) %]
|
||||
<div class="dialog message">
|
||||
<h4>Share content with Mana KB?</h4>
|
||||
<p> You haven't decided if you want to activate Mana Knowledge Base. <a href=/cgi-bin/koha/admin/share_content.pl>Change your Mana KB settings</a>.</p>
|
||||
</div>
|
||||
[% IF ( CAN_user_parameters_manage_mana ) %]
|
||||
[% IF ( Koha.Preference('Mana') == 1) && !mana_url %]
|
||||
<div class="dialog message">
|
||||
<h4>The Mana Knowledge Base feature is enabled but not configured.</h4>
|
||||
<p>This feature allows you to retrieve and share data (subscription patterns and reports) with other Koha libaries.</p>
|
||||
<p>
|
||||
Ask your system administrator to configure this feature, or remove this note by <a href=/cgi-bin/koha/admin/share_content.pl>disabling the 'Mana' system preference</a>.
|
||||
</p>
|
||||
</div>
|
||||
[% END %]
|
||||
[% IF ( Koha.Preference('Mana') == 2 ) %]
|
||||
<div class="dialog message">
|
||||
<h4>Share content with Mana KB?</h4>
|
||||
<p> You haven't decided if you want to activate Mana Knowledge Base. <a href=/cgi-bin/koha/admin/share_content.pl>Change your Mana KB settings</a>.</p>
|
||||
</div>
|
||||
[% END %]
|
||||
[% END %]
|
||||
<h1>Koha administration</h1>
|
||||
<div class="row">
|
||||
|
|
@ -172,7 +174,7 @@
|
|||
</dl>
|
||||
[% END %]
|
||||
|
||||
[% IF ( ( CAN_user_parameters_manage_search_targets || CAN_user_parameters_manage_didyoumean || CAN_user_parameters_manage_column_config || CAN_user_parameters_manage_audio_alerts || CAN_user_parameters_manage_sms_providers && Koha.Preference('SMSSendDriver') == 'Email' ) || CAN_user_parameters_manage_usage_stats ) %]
|
||||
[% IF ( ( CAN_user_parameters_manage_search_targets || CAN_user_parameters_manage_didyoumean || CAN_user_parameters_manage_column_config || CAN_user_parameters_manage_audio_alerts || CAN_user_parameters_manage_sms_providers && Koha.Preference('SMSSendDriver') == 'Email' ) || CAN_user_parameters_manage_usage_stats || CAN_user_parameters_manage_mana ) %]
|
||||
<h3>Additional parameters</h3>
|
||||
<dl>
|
||||
<!-- <dt><a href="/cgi-bin/koha/admin/printers.pl">Network Printers</a></dt>
|
||||
|
|
@ -201,7 +203,7 @@
|
|||
<dt><a href="/cgi-bin/koha/admin/usage_statistics.pl">Share your usage statistics</a></dt>
|
||||
<dd>Share with the Koha community the usage statistics of your Koha installation.</dd>
|
||||
[% END %]
|
||||
[% IF ( CAN_user_parameters ) %]
|
||||
[% IF ( CAN_user_parameters_manage_mana ) %]
|
||||
<dt><a href="/cgi-bin/koha/admin/share_content.pl">Share content with Mana KB</a></dt>
|
||||
<dd>Share content (subscriptions, reports) with the Koha community</dd>
|
||||
[% END %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue