Bugzilla – Attachment 42538 Details for
Bug 14298
AutoSelfCheckID user should only be able to access SCO
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 14298: Add warning to the about page if the sco user does not have correct permissions
PASSED-QA-Bug-14298-Add-warning-to-the-about-page-.patch (text/plain), 4.21 KB, created by
Katrin Fischer
on 2015-09-14 19:27:19 UTC
(
hide
)
Description:
[PASSED QA] Bug 14298: Add warning to the about page if the sco user does not have correct permissions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-09-14 19:27:19 UTC
Size:
4.21 KB
patch
obsolete
>From 0971551e90a1f52a348e440f29c59d95ea531b60 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 2 Sep 2015 16:30:15 +0100 >Subject: [PATCH] [PASSED QA] Bug 14298: Add warning to the about page if the > sco user does not have correct permissions > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >Note: Made a little change, changed He should have, to They should have > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > about.pl | 28 ++++++++++++++++++++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 14 ++++++++++-- > 2 files changed, 40 insertions(+), 2 deletions(-) > >diff --git a/about.pl b/about.pl >index 29777cf..5cd5d18 100755 >--- a/about.pl >+++ b/about.pl >@@ -213,6 +213,34 @@ if ( !defined C4::Context->config('use_zebra_facets') ) { > } > } > >+# Sco Patron should not contain any other perms than circulate => self_checkout >+if ( C4::Context->preference('WebBasedSelfCheck') >+ and C4::Context->preference('AutoSelfCheckAllowed') >+) { >+ my $userid = C4::Context->preference('AutoSelfCheckID'); >+ my $all_permissions = C4::Auth::get_user_subpermissions( $userid ); >+ my ( $has_self_checkout_perm, $has_other_permissions ); >+ while ( my ( $module, $permissions ) = each %$all_permissions ) { >+ if ( $module eq 'circulate' ) { >+ while ( my ( $permission, $flag ) = each %$permissions ) { >+ if ( $permission eq 'self_checkout' ) { >+ $has_self_checkout_perm = 1; >+ } else { >+ $has_other_permissions = 1; >+ } >+ } >+ } else { >+ $has_other_permissions = 1; >+ } >+ } >+ $template->param( >+ AutoSelfCheckPatronDoesNotHaveSelfCheckPerm => not ( $has_self_checkout_perm ), >+ AutoSelfCheckPatronHasTooManyPerm => $has_other_permissions, >+ ); >+ >+ >+} >+ > $template->param( > kohaVersion => $kohaVersion, > osVersion => $osVersion, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index 90af345..ec65380 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -101,7 +101,7 @@ > > <div id="sysinfo"> > [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || >- warnNoActiveCurrency || QueryParserError || warnIsRootUser || xml_config_warnings.size %] >+ warnNoActiveCurrency || QueryParserError || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm %] > [% IF (warnIsRootUser) %] > <h2>Warning regarding current user</h2> > <p>You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p> >@@ -109,7 +109,7 @@ > [% END %] > > [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || >- warnNoActiveCurrency || QueryParserError %] >+ warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm %] > <h2>Warnings regarding the system configuration</h2> > <table> > <caption>Preferences and parameters</caption> >@@ -137,6 +137,16 @@ > </td> > </tr> > [% END %] >+ [% IF AutoSelfCheckPatronDoesNotHaveSelfCheckPerm %] >+ <tr><th scope="row"><b>Warning</b> </th><td> >+ The patron used for the self checkout module at the OPAC does not have the circulate => self_checkout permission. >+ </td></tr> >+ [% END %] >+ [% IF AutoSelfCheckPatronHasTooManyPerm %] >+ <tr><th scope="row"><b>Warning</b> </th><td> >+ The patron used for the self checkout module at the OPAC has too many permissions. They should only have circulate => self_checkout. >+ </td></tr> >+ [% END %] > </table> > [% END %] > >-- >1.9.1
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 14298
:
42229
|
42230
|
42231
|
42249
|
42250
|
42251
|
42511
|
42536
|
42537
| 42538 |
42539
|
45136
|
45139