The two preferences: SCOUserCSS and SCOUserJS --- Do not apply to the selfcheck login page. To reproduce: * Make changes using above prefs * GOTO selfcheck module: http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl If you have not logged in, your changes will not be visible.
Created attachment 46736 [details] [review] Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page Currently if not logged in when browsing to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl You are redirected to opac-auth.pl and SCOUserCSS and SCOUserJS are not loaded. This patch adds new opac-auth.tt file for authenticating SCO users which loads these files and redirects a login to the SCO module instead of the patron account Common code between opac-auth and sco-auth is mostly alternate login info and has been move to alt-auth.inc To test: 1 - Verify that normal login works on both staff and opac 2 - Verify that SCO login goes to a new page 3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are present on SOC log in page 4 - Verify that a logged in opac user without permissions cannot access the self-checkout module 5 - Verify that AutoSelfCheckAllowed and associated system preferences function as expected 6 - Verify the AutoSelfCheck user is logged out if they attempt to visit another page Bonus points for verifying all alternate methonds of login function as expected Sponsored by Northeast Kansas Libary System (NEKLS) www.nekls.org
Comment on attachment 46736 [details] [review] Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page Review of attachment 46736 [details] [review]: ----------------------------------------------------------------- ::: C4/Auth.pm @@ +1250,5 @@ > PatronSelfRegistrationDefaultCategory => C4::Context->preference("PatronSelfRegistrationDefaultCategory"), > persona => C4::Context->preference("Persona"), > opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, > + SCOUserCSS => C4::Context->preference("SCOUserCSS"), > + SCOUserJS => C4::Context->preference("SCOUserJS"), There is no need to pass system preferences. Use Koha.Preference calls in the Template Toolkit files.
Created attachment 47270 [details] [review] Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page Currently if not logged in when browsing to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl You are redirected to opac-auth.pl and SCOUserCSS and SCOUserJS are not loaded. This patch adds new opac-auth.tt file for authenticating SCO users which loads these files and redirects a login to the SCO module instead of the patron account Common code between opac-auth and sco-auth is mostly alternate login info and has been move to alt-auth.inc To test: 1 - Verify that normal login works on both staff and opac 2 - Verify that SCO login goes to a new page 3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are present on SOC log in page 4 - Verify that a logged in opac user without permissions cannot access the self-checkout module 5 - Verify that AutoSelfCheckAllowed and associated system preferences function as expected 6 - Verify the AutoSelfCheck user is logged out if they attempt to visit another page Bonus points for verifying all alternate methonds of login function as expected Sponsored by Northeast Kansas Libary System (NEKLS) www.nekls.org
(In reply to M. Tompsett from comment #2) > There is no need to pass system preferences. Use Koha.Preference calls in > the Template Toolkit files. Fixed the calls I added, thanks Mark!
Created attachment 47317 [details] [review] Bug 12663 - Prevent OPACUserJS and OPACUserCSS from loading Update includes to not load these prefs on any sco page
Created attachment 47318 [details] [review] [SIGNED-OFF] Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page Currently if not logged in when browsing to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl You are redirected to opac-auth.pl and SCOUserCSS and SCOUserJS are not loaded. This patch adds new opac-auth.tt file for authenticating SCO users which loads these files and redirects a login to the SCO module instead of the patron account Common code between opac-auth and sco-auth is mostly alternate login info and has been move to alt-auth.inc To test: 1 - Verify that normal login works on both staff and opac 2 - Verify that SCO login goes to a new page 3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are present on SOC log in page 4 - Verify that a logged in opac user without permissions cannot access the self-checkout module 5 - Verify that AutoSelfCheckAllowed and associated system preferences function as expected 6 - Verify the AutoSelfCheck user is logged out if they attempt to visit another page Bonus points for verifying all alternate methonds of login function as expected Sponsored by Northeast Kansas Libary System (NEKLS) www.nekls.org Signed-off-by: Heather Braum <hbraum@nekls.org>
Created attachment 47319 [details] [review] [SIGNED-OFF] Bug 12663 - Prevent OPACUserJS and OPACUserCSS from loading Update includes to not load these prefs on any sco page Signed-off-by: Heather Braum <hbraum@nekls.org>
Heather, did you win the bonus points?
Heather, Have you tested the CAS and Shibboleth authentication methods?
I don't believe so as they don't use either at NEKLS
I don't like the new "type" these patches introduced, and I don't understand the complexity of the patches: The SCO user should only be used for the SCO module. From this assumption why don't you just test if the logged in user is the one defined in the AutoSelfCheckID pref? I may missed something and it could be a naive approach, but so easy :)
Jonathan, we're needing to use Koha's Self Check at multiple branches, so have to use multiple logins; we can't save those to the AutoSelfCheckID sys pef as a result. Hence the development need. I'll can't answer the complexity question :) I'll let Nick do that.
(In reply to Heather Braum from comment #12) > Jonathan, we're needing to use Koha's Self Check at multiple branches, so > have to use multiple logins; we can't save those to the AutoSelfCheckID sys > pef as a result. Hence the development need. I'll can't answer the > complexity question :) I'll let Nick do that. You are overriding the pref values
(In reply to Jonathan Druart from comment #13) > (In reply to Heather Braum from comment #12) > > Jonathan, we're needing to use Koha's Self Check at multiple branches, so > > have to use multiple logins; we can't save those to the AutoSelfCheckID sys > > pef as a result. Hence the development need. I'll can't answer the > > complexity question :) I'll let Nick do that. (previous comment left too fast!) You are overriding the pref values using the ENV var, that's what you mean? If yes, it should not change anything to what I suggested :)
You are correct Joubu, there are easier methods, patch to follow later
Created attachment 48831 [details] [review] Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page Currently if not logged in when browsing to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl You are redirected to opac-auth.tt and SCOUserCSS and SCOUserJS are not loaded. This page passes through a parameter to the template to indicate this is an SCO login and appropriate CSS and JS should be loaded. Additionally this patch ensure that when loggin in using the form you are redirected to the sco-main.pl instead of the patron account page for the user. To test: 1 - Verify that normal login works on both staff and opac 2 - Verify that SCO link goes to login page if AutoSelfCheckAllowed is not allowed 3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are present on SOC log in page 4 - Verify that a logged in opac user without permissions cannot access the self-checkout module 5 - Verify that AutoSelfCheckAllowed and associated system preferences function as expected 6 - Verify the AutoSelfCheck user is logged out if they attempt to visit another page
I can not reproduce the issue on current master.
(In reply to Marc Véron from comment #17) > I can not reproduce the issue on current master. I though I couldn't either, but I figured it out: This bug is about the login page which is shown when the administrative user signs in, not the individual self check user. So if you have AutoSelfCheckAllowed set to "Don't allow," a staff user must sign in at the self check machine before patrons can use it. It's this login page (the regular OPAC's login form) which is affected by this patch. This detail is missing from the test plan. As far as SCOUserJS and SCOUserCSS are concerned this patch works as described. However patron logins to self check are now broken. I can sign in successfully as the administrative user, but when I sign in as the patron I'm redirected to the administrative sign-in page.
Created attachment 49595 [details] [review] Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page Currently if not logged in when browsing to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl You are redirected to opac-auth.tt and SCOUserCSS and SCOUserJS are not loaded. This page passes through a parameter to the template to indicate this is an SCO login and appropriate CSS and JS should be loaded. Additionally this patch ensure that when loggin in using the form you are redirected to the sco-main.pl instead of the patron account page for the user. To test: 1 - Verify that normal login works on both staff and opac 2 - Verify that SCO link goes to login page if AutoSelfCheckAllowed is set to "Don't allow" 3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are present on SCO log in page with AutoSelfCheck disabled 4 - Verify that a logged in opac user without permissions cannot access the self-checkout module 5 - Verify that AutoSelfCheckAllowed and associated system preferences function as expected 6 - Verify the AutoSelfCheck user is logged out if they attempt to visit another page
Created attachment 49602 [details] [review] Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page Currently if not logged in when browsing to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl You are redirected to opac-auth.tt and SCOUserCSS and SCOUserJS are not loaded. This page passes through a parameter to the template to indicate this is an SCO login and appropriate CSS and JS should be loaded. Additionally this patch ensure that when loggin in using the form you are redirected to the sco-main.pl instead of the patron account page for the user. To test: 1 - Verify that normal login works on both staff and opac 2 - Verify that SCO link goes to login page if AutoSelfCheckAllowed is set to "Don't allow" 3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are present on SCO log in page with AutoSelfCheck disabled 4 - Verify that a logged in opac user without permissions cannot access the self-checkout module 5 - Verify that AutoSelfCheckAllowed and associated system preferences function as expected 6 - Verify the AutoSelfCheck user is logged out if they attempt to visit another page Followed test plan. If I go to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl, CSS and JS trigger already on the login form, I suppose that is intended. Signed-off-by: Marc Véron <veron@veron.ch>
Oh, it helps to read the bug tile, of course it is intended :-)
I am not happy about the change of behaviour here. By using an if-else-construct where OPACUserCSS and OpacUserJS are in the else branch this removes all the styling done to the login page per these preferences. As the SCO login page looks like a normal OPAC page, this doesn't feel right.
(In reply to Katrin Fischer from comment #22) > By using an if-else-construct where OPACUserCSS and OpacUserJS are in the > else branch this removes all the styling done to the login page per these > preferences. As the SCO login page looks like a normal OPAC page, this > doesn't feel right. The intention here is to allow the library to make this page look different, removing the css and js that is present on the opac is intended to help that. My thought would be to add another IF/ELSE block and if this is an SCO login change "Log in to your account" to 'Staff log in to self checkout station" and maybe a link back to the opac login. Would that work for you?
We can get more opinions on this - but maybe the page needs a rework? It doesn't appear as part of the self check sites at the moment, so that's why I am not sure about changing the current behavour. It shows the header and footer as all of the normal OPAC sites. If the SCOUserCSS is after the normal OpacUSerCSS you will still be able to overwrite everything that you don't like, without introducing a change in behaviour. Could that work?
Created attachment 49745 [details] [review] Bug 12663: (QA followup) Insert SCOUserCSS/JS 'after' OPACUserCSS/JS rather than 'instead of' i.e. Remove IF/ELSE and use 2 IF
Please rebase! Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page Using index info to reconstruct a base tree... M C4/Auth.pm M koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-auth.tt Auto-merging C4/Auth.pm Failed to merge in the changes.
Created attachment 49864 [details] [review] Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page Currently if not logged in when browsing to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl You are redirected to opac-auth.tt and SCOUserCSS and SCOUserJS are not loaded. This page passes through a parameter to the template to indicate this is an SCO login and appropriate CSS and JS should be loaded. Additionally this patch ensure that when loggin in using the form you are redirected to the sco-main.pl instead of the patron account page for the user. To test: 1 - Verify that normal login works on both staff and opac 2 - Verify that SCO link goes to login page if AutoSelfCheckAllowed is set to "Don't allow" 3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are present on SCO log in page with AutoSelfCheck disabled 4 - Verify that a logged in opac user without permissions cannot access the self-checkout module 5 - Verify that AutoSelfCheckAllowed and associated system preferences function as expected 6 - Verify the AutoSelfCheck user is logged out if they attempt to visit another page Followed test plan. If I go to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl, CSS and JS trigger already on the login form, I suppose that is intended. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 49865 [details] [review] Bug 12663: (QA followup) Insert SCOUserCSS/JS 'after' OPACUserCSS/JS rather than 'instead of' i.e. Remove IF/ELSE and use 2 IF
Created attachment 49879 [details] [review] [PASSED QA] Bug 12663 - SCOUserCSS and SCOUserJS ignored on selfcheck login page Currently if not logged in when browsing to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl You are redirected to opac-auth.tt and SCOUserCSS and SCOUserJS are not loaded. This page passes through a parameter to the template to indicate this is an SCO login and appropriate CSS and JS should be loaded. Additionally this patch ensure that when loggin in using the form you are redirected to the sco-main.pl instead of the patron account page for the user. To test: 1 - Verify that normal login works on both staff and opac 2 - Verify that SCO link goes to login page if AutoSelfCheckAllowed is set to "Don't allow" 3 - Enter changes into SCOUserJS and SCOUserCSS and observe these are present on SCO log in page with AutoSelfCheck disabled 4 - Verify that a logged in opac user without permissions cannot access the self-checkout module 5 - Verify that AutoSelfCheckAllowed and associated system preferences function as expected 6 - Verify the AutoSelfCheck user is logged out if they attempt to visit another page Followed test plan. If I go to http://YOURCATALOG/cgi-bin/koha/sco/sco-main.pl, CSS and JS trigger already on the login form, I suppose that is intended. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 49880 [details] [review] [PASSED QA] Bug 12663: (QA followup) Insert SCOUserCSS/JS 'after' OPACUserCSS/JS rather than 'instead of' i.e. Remove IF/ELSE and use 2 IF Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to Master - Should be in the May 2016 release! Thanks!
Patch pushed to 3.22.x, will be in 3.22.7