Bug 20479

Summary: Superlibrarians cannot log into opac
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: OPACAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi (tcohen) <tomascohen>
Severity: blocker    
Priority: P5 - low CC: jonathan.druart, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 15492    
Bug Blocks: 20649    
Attachments: Bug 20479 - Don't kick superlibrarians out of the opac
Bug 20479 - Don't kick superlibrarians out of the opac
Bug 20479 (follow-up) Don't try to get flags for database user
Bug 20479: Use instead of fetching patron
Bug 20479: Don't kick superlibrarians out of the opac
Bug 20479: (follow-up) Don't try to get flags for database user
Bug 20479: Use instead of fetching patron
Bug 20479: Use $flag instead of fetching patron
Bug 20479: Ease readability - do not enter the block if not logged in

Description Nick Clemens (kidclamp) 2018-03-27 12:49:47 UTC
Bug 15492 kicks out users who have self checkin permissions, let's not kick out superlibrarians
Comment 1 Nick Clemens (kidclamp) 2018-03-27 12:51:03 UTC
Created attachment 73311 [details] [review]
Bug 20479 - Don't kick superlibrarians out of the opac

To test:
1 - Try to log in to opac with a superlibrarian
2 - Everythign goes wrong
3 - Apply patch
4 - Try to log in with superlibrarian
5 - You can sign in
Comment 2 Claire Gravely 2018-03-27 12:54:39 UTC
Created attachment 73312 [details] [review]
Bug 20479 - Don't kick superlibrarians out of the opac

To test:
1 - Try to log in to opac with a superlibrarian
2 - Everythign goes wrong
3 - Apply patch
4 - Try to log in with superlibrarian
5 - You can sign in

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 3 Tomás Cohen Arazi (tcohen) 2018-03-27 14:46:49 UTC
(In reply to Claire Gravely from comment #2)
> Created attachment 73312 [details] [review] [review]
> Bug 20479 - Don't kick superlibrarians out of the opac
> 
> To test:
> 1 - Try to log in to opac with a superlibrarian
> 2 - Everythign goes wrong
> 3 - Apply patch
> 4 - Try to log in with superlibrarian
> 5 - You can sign in
> 
> Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

The patch is almost correct: it will fail for the DB user. BTW: I filed 20480 for the styling issue.
Comment 4 Nick Clemens (kidclamp) 2018-03-27 15:07:30 UTC
Created attachment 73321 [details] [review]
Bug 20479 (follow-up) Don't try to get flags for database user

Login will still break in opac-user.pl, but that seems a bigger problem
not from SCI module
Comment 5 Jonathan Druart 2018-03-27 15:48:13 UTC
Created attachment 73326 [details] [review]
Bug 20479: Use  instead of fetching patron
Comment 6 Tomás Cohen Arazi (tcohen) 2018-03-27 16:14:09 UTC
Created attachment 73327 [details] [review]
Bug 20479: Don't kick superlibrarians out of the opac

To test:
1 - Try to log in to opac with a superlibrarian
2 - Everythign goes wrong
3 - Apply patch
4 - Try to log in with superlibrarian
5 - You can sign in

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Tomás Cohen Arazi (tcohen) 2018-03-27 16:14:18 UTC
Created attachment 73328 [details] [review]
Bug 20479: (follow-up) Don't try to get flags for database user

Login will still break in opac-user.pl, but that seems a bigger problem
not from SCI module

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Tomás Cohen Arazi (tcohen) 2018-03-27 16:14:27 UTC
Created attachment 73329 [details] [review]
Bug 20479: Use instead of fetching patron

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Jonathan Druart 2018-03-27 16:29:37 UTC
Created attachment 73331 [details] [review]
Bug 20479: Use $flag instead of fetching patron

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Jonathan Druart 2018-03-27 16:34:59 UTC
We could use $flags instead of haspermission, but it will make the code less readable. Maybe we need to create a new subroutine.
Comment 11 Jonathan Druart 2018-03-27 16:38:00 UTC
Created attachment 73337 [details] [review]
Bug 20479: Ease readability - do not enter the block if not logged in
Comment 12 Jonathan Druart 2018-03-27 16:44:09 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 13 Nick Clemens (kidclamp) 2018-04-23 22:52:42 UTC
Depends on feature not in stable.