avalonmediasystem / avalon

Avalon Media System – Samvera Application
http://www.avalonmediasystem.org/
Apache License 2.0
94 stars 51 forks source link

Add Controlled Digital Lending Values to Avalon Config #4727

Closed joncameron closed 2 years ago

joncameron commented 2 years ago

Description

Adding a new ability to configure in Avalon's settings file for controlled digital lending, as well as an option value to set the application-wide default for lending periods and value for maximum number of items a patron may borrow at one time.

Done Looks Like

Something along the lines of:

controlled_digital_lending:
  enable: true
  default_lending_period: 14 days
  max_checkouts_per_user: 25
cjcolvar commented 2 years ago

ISO8601 Duration (e.g. "P14D" or "P2W") ActiveSupport::Duration.parse("P14D") == 14.days DateTime.current + ActiveSupport::Duration.parse("P14D")