Uploaded image for project: 'SimplyE 2.0'
  1. SimplyE 2.0
  2. SIMPLY-1020

Specify a specific lane as the library root

XMLWordPrintable

      Currently the authentication document at http://openbookshelf.dp.la/OB/authentication_document lists the start of the OPDS feed as http://openbookshelf.dp.la/OB/. In an ordinary library this would be the correct link, but for Open Bookshelf the actual start of the OPDS feed is a specific lane: http://openbookshelf.dp.la/OB/groups/3

      Currently this isn't a problem because Accounts.json has http://openbookshelf.dp.la/OB/groups/3 hard-coded as the catalogUrl for this library. But Accounts.json is going away soon, and when it does this authentication document needs to point to the right URL.

      There are two bits of code that could be extended to get to this point. The first is IndexController.appropriate_index_for_patron_type(), which can send authenticated patrons to one lane or another based on their patron type. It won't work unaltered here because Open Bookshelf doesn't authenticate patrons, so IndexController._call_ probably won't decide to call appropriate_index_for_patron_type(). But you could set it up so that if Lane.root_for_patron_type was '*' then it would always redirect incoming requests to that lane, even without an active patron.

      The second way you could do this is with a CustomIndexView that always redirects to a specific lane. I think this would be more reliable. After creating the CustomIndexView system I felt like it would be better to reimplement "redirect to a lane based on patron type" as a CustomIndexView, and "redirect to the same lane every time" is a simpler version of that.

            leonardrichardson Leonard Richardson [X] (Inactive)
            leonardrichardson Leonard Richardson [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: