cca / koha_snippets

code to be pasted into Koha's admin side
https://library.cca.edu
Other
4 stars 0 forks source link

show OPACMySummaryNote warning only for relevant patrons #15

Closed phette23 closed 4 years ago

phette23 commented 4 years ago

Right now we use OPACMySummaryNote to display a notice towards the end of the semester about student accounts expiring. It displays for everyone even though it's only relevant for Undergraduate and Grad Student patron types. Ideally, we would only show it for relevant types.

There are a few use cases where knowing the patron type of the logged in user would help us deliver more appropriate messages. It appears this isn't possible without further work. My first idea is to make a public report that accepts a borrowernumber parameter and returns the patron category. That seems sufficiently secure (passing usernames or real names would not be).

Note that we're using a hack in catalog-js/opac-user.js to show this message right now because Koha bug 23968 broke the OPACMySummaryNote display. It will be fixed in 19.11 and then we can remove our JS hack.