Bug 24249 - OPAC lists page should require login for login-dependent operations
Summary: OPAC lists page should require login for login-dependent operations
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 24247
  Show dependency treegraph
 
Reported: 2019-12-16 17:41 UTC by Owen Leonard
Modified: 2020-03-12 23:56 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Enhancements to lists: - Log in links to create a new list now take you to the 'Create a new list' form after you log in, instead of to your account summary page. - Logging in is required for any action other the viewing public lists.
Version(s) released in:
20.05.00


Attachments
Bug 24249: OPAC lists page should require login for login-dependent operations (3.79 KB, patch)
2019-12-16 17:51 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24249: OPAC lists page should require login for login-dependent operations (4.06 KB, patch)
2020-01-21 19:40 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24249: OPAC lists page should require login for login-dependent operations (5.98 KB, patch)
2020-02-13 13:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 24249: OPAC lists page should require login for login-dependent operations (6.02 KB, patch)
2020-02-13 20:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 24249: OPAC lists page should require login for login-dependent operations (6.08 KB, patch)
2020-02-17 21:19 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2019-12-16 17:41:05 UTC
Currently the OPAC lists page doesn't require a login to access pages like the list-creation form. It would be a more seamless process for users if they were prompted to log in before reaching those forms.
Comment 1 Owen Leonard 2019-12-16 17:51:54 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2020-01-02 23:10:32 UTC
Hi Owen, I am not sure what the difference here is between before and after. I haven't been able to find a link to the 'add list' form, but only 'log in' links. Can you explain the change a bit more?
Comment 3 Katrin Fischer 2020-01-19 23:19:46 UTC
(In reply to Katrin Fischer from comment #2)
> Hi Owen, I am not sure what the difference here is between before and after.
> I haven't been able to find a link to the 'add list' form, but only 'log in'
> links. Can you explain the change a bit more?

ping?
Comment 4 Owen Leonard 2020-01-21 19:40:31 UTC
Created attachment 97683 [details] [review]
Bug 24249: OPAC lists page should require login for login-dependent operations

This patch modifies opac-shelves.pl so that login is required if the
requested operation is anything but "view" and "list."

The patch also modifies a couple of "Log in to create a new list" links
so that they point to the list creation form instead of opac-user.pl.

To test, apply the patch and go to the main lists page (the list of
lists) in the OPAC while not logged in.

 - Click the "Log in to create a new list" link.
 - Log in.
 - You should be taken to the "Create a new list" form.
 - Also test the "New list" link shown in the toolbar when you're
   viewing the contents of a list.
Comment 5 David Nind 2020-01-22 09:20:38 UTC
This works when you go 'Lists > Your lists > Log in to create a new list' (you end up at /cgi-bin/koha/opac-shelves.pl?op=add_form).

However, when you go 'Lists > Log in to create your own lists' it goes to the your summary page (/cgi-bin/koha/opac-user.pl?has-search-query=).

Also, logging in the via 'Lists > Your lists > Log in to create your own lists' comes up with a modal for your username and password, the other way it is an inline form. This is how it works now, but seems a little inconsistent. Probably another bug though...
Comment 6 David Nind 2020-01-22 09:42:11 UTC
I looked at the code and for 'Log in to create your own lists' is in koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc, lines 73 and 75.
Comment 7 Owen Leonard 2020-02-13 13:24:39 UTC
Created attachment 98824 [details] [review]
Bug 24249: OPAC lists page should require login for login-dependent operations

This patch modifies opac-shelves.pl so that login is required if the
requested operation is anything but "view" and "list."

The patch also modifies a couple of "Log in to create a new list" links
so that they point to the list creation form instead of opac-user.pl.

To test, apply the patch and go to the main lists page (the list of
lists) in the OPAC while not logged in.

 - Click the "Log in to create a new list" link.
 - Log in.
 - You should be taken to the "Create a new list" form.
 - Also test the "New list" link shown in the toolbar when you're
   viewing the contents of a list.
 - When not logged in click the "Lists" menu in the page's header menu.
   Clicking "Log in to create a new list" should take you to the login
   form and then to the list creation form.
Comment 8 David Nind 2020-02-13 20:02:03 UTC
Created attachment 98886 [details] [review]
Bug 24249: OPAC lists page should require login for login-dependent operations

This patch modifies opac-shelves.pl so that login is required if the
requested operation is anything but "view" and "list."

The patch also modifies a couple of "Log in to create a new list" links
so that they point to the list creation form instead of opac-user.pl.

To test, apply the patch and go to the main lists page (the list of
lists) in the OPAC while not logged in.

 - Click the "Log in to create your own lists" link.
 - Log in.
 - You should be taken to the "Create a new list" form.
 - Also test the "New list" link shown in the toolbar when you're
   viewing the contents of a list.
 - When not logged in click the "Lists" menu in the page's header menu.
   Clicking "Log in to create a new list" should take you to the login
   form and then to the list creation form.

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 Katrin Fischer 2020-02-17 21:19:27 UTC
Created attachment 99132 [details] [review]
Bug 24249: OPAC lists page should require login for login-dependent operations

This patch modifies opac-shelves.pl so that login is required if the
requested operation is anything but "view" and "list."

The patch also modifies a couple of "Log in to create a new list" links
so that they point to the list creation form instead of opac-user.pl.

To test, apply the patch and go to the main lists page (the list of
lists) in the OPAC while not logged in.

 - Click the "Log in to create a new list" link.
 - Log in.
 - You should be taken to the "Create a new list" form.
 - Also test the "New list" link shown in the toolbar when you're
   viewing the contents of a list.
 - When not logged in click the "Lists" menu in the page's header menu.
   Clicking "Log in to create a new list" should take you to the login
   form and then to the list creation form.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 10 Martin Renvoize 2020-02-19 11:34:38 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 11 Joy Nelson 2020-03-12 23:56:17 UTC
Enhancement not backported to 19.11.x