Skip to content

Commit 857672f

Browse files
committed
Merge branch 'develop' into main
2 parents 23c1aad + 0e59b8c commit 857672f

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change log for DIBS
22

3+
## Version 0.4.1
4+
5+
* Fix issue #85: remove email address from server log message printed during status checks
6+
7+
38
## Version 0.4.0
49

510
This version implements an interface for starting the IIIF image processing workflow. This is implemented in the `dibs/templates/list.tpl` template file, with an an addition to `settings.ini`. It interacts with the "available" column in the `/list` page.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ In order to use DIBS at another institution (other than [Caltech](https://www.ca
5050
2. A **web server** to host DIBS. The current version of DIBS has only been tested with Apache2 on Linux (specifically, Ubuntu 20) and macOS (specifically 10.13, High Sierra). DIBS comes with a WSGI adapter file and sample config file for Apache, but it should be possible to run DIBS in other WSGI-compliant servers.
5151
3. An **authentication layer**. For authentication, DIBS assumes that the web server takes care of user authentication in such a way that DIBS is behind the authentication layer and all users who can reach the DIBS pages are allowed to view content. DIBS only implements checks to distinguish between regular users versus staff who are allowed to access restricted pages. For the authentication layer, at Caltech we use the [Shibboleth](https://en.wikipedia.org/wiki/Shibboleth_Single_Sign-on_architecture) single sign-on system, but it is possible to use other schemes. The installation and configuration of a single sign-on system depends on the specifics of a given institution, and are not described here.
5252
4. Modification to the metadata retrieval code. We strove to limit dependencies on external systems, but the interface for staff to add items to DIBS requires looking up some limited metadata based on an item's barcode, and lacking a universal scheme or ILS interface to do that, we had to hard code the access. Thankfully, this is limited to just a few lines in [`server.py`](dibs/server.py). We currently use TIND at Caltech, so unless you also use TIND, you will need to modify the TIND-specific lines in that file.
53-
5. Modification to the HTML templates to change the branding. The template files in [dibs/templates](dibs/templates) are specific to Caltech, and will need to be edited to suit another installation. (We are open to making the branding customization easier and would welcome a [pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) for suitable changes!)
53+
5. Modification to the HTML templates to change the branding. The template files in [`dibs/templates`](dibs/templates) are specific to Caltech, and will need to be edited to suit another installation. (We are open to making the branding customization easier and would welcome a [pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) for suitable changes!)
5454

5555

5656
## Installation

codemeta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"codeRepository": "https://github.com/caltechlibrary/dibs",
77
"issueTracker": "https://github.com/caltechlibrary/dibs/issues",
88
"license": "https://github.com/caltechlibrary/dibs/blob/master/LICENSE",
9-
"version": "0.4.0",
9+
"version": "0.4.1",
1010
"author": [
1111
{
1212
"@type": "Person",

dibs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# | by the Makefile. Manual changes to these values will be lost. |
2323
# ╰────────────────────── Notice ── Notice ── Notice ─────────────────────╯
2424

25-
__version__ = '0.4.0'
25+
__version__ = '0.4.1'
2626
__description__ = 'An implementation of Controlled Digital Lending'
2727
__url__ = 'https://github.com/caltechlibrary/dibs'
2828
__author__ = 'Michael Hucka, Robert S. Doiel, Tommy Keswick, Stephen Davison'

dibs/roles.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def has_role(person, role):
2525

2626

2727
def role_to_redirect(role):
28-
'''given a user role (including an empty string) return the target path for a redirect'''
28+
'''Given a user role (including an empty string), return the target
29+
path for a redirect.'''
2930
if role in _role_table:
3031
return _role_table[role]
3132
else:

dibs/server.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,13 +513,14 @@ def loan_availability(user, barcode):
513513
explanation = ''
514514
when_available = None
515515
loan = Loan.get_or_none(Loan.user == user, Loan.item == item)
516+
who = anon(user)
516517
if loan:
517518
if loan.state == 'active':
518-
log(f'{user} already has {barcode} on loan')
519+
log(f'{who} already has {barcode} on loan')
519520
status = Status.LOANED_BY_USER
520521
explanation = 'This item is currently on digital loan to you.'
521522
else:
522-
log(f'{user} had a loan on {barcode} too recently')
523+
log(f'{who} had a loan on {barcode} too recently')
523524
status = Status.TOO_SOON
524525
explanation = ('Your loan period has ended and it is too soon '
525526
'after the last time you borrowed it.')
@@ -528,7 +529,7 @@ def loan_availability(user, barcode):
528529
loan = Loan.get_or_none(Loan.user == user, Loan.state == 'active')
529530
if loan:
530531
other = loan.item
531-
log(f'{user} has a loan on {other.barcode} that ends at {loan.end_time}')
532+
log(f'{who} has a loan on {other.barcode} that ends at {loan.end_time}')
532533
status = Status.USER_HAS_OTHER
533534
author = shorten(other.author, width = 50, placeholder = ' …')
534535
explanation = ('You have another item currently on loan'
@@ -543,7 +544,7 @@ def loan_availability(user, barcode):
543544
explanation = 'All available copies are currently on loan.'
544545
when_available = min(loan.end_time for loan in loans)
545546
else:
546-
log(f'{user} is allowed to borrow {barcode}')
547+
log(f'{who} is allowed to borrow {barcode}')
547548
status = Status.AVAILABLE
548549

549550
return item, status, explanation, when_available

0 commit comments

Comments
 (0)