Bug 9032: add ability to invite another to share a private list
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 20 May 2013 15:57:39 +0000 (17:57 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 20 Apr 2014 20:57:41 +0000 (20:57 +0000)
commitc7e679812f4307e3c59b4e045787071e823e7da8
treedec2055747ea7026843527594baf602272547d63
parent9fa0649c5c755bc16b66a177cd330f93a285e05d
Bug 9032: add ability to invite another to share a private list

This patch

- Adds a Share button for OPAC private lists.
- Allows you to send an invitation to share a list.
- Checks on validity of email addresses (with Email::Valid).

Test plan:
1) Sharing depends on syspref and login.
Toggle the pref OpacAllowSharingPrivateList.
If enabled, you should see the Share button in OPAC/Private lists.
Click on the Share button. You should get Share a list.
Logout and try to go back to opac/opac-shareshelf.pl
It should now present you the login form.

2) Try to share a public list or a list you do not own.
Find a security hole in the interface. Or hack the shareshelf URL and
replace the shelfnumber with a public list number.

3) Enter no email address or invalid ones (no domain, forbidden chars).
If you enter no address, submit should not work.
If you enter only wrong addresses (separated by: ,:; ), you get a
message.

4) Test if sending the invitation works.
Share one of your private lists. Enter your own email address.
After your proc_message_queue cronjob ran, you should have an email.
Check also if you see a new record in the virtualshelfshares table.
Note that the followup patch handles the second part of accepting this
share.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/VirtualShelves.pm
koha-tmpl/opac-tmpl/prog/en/modules/opac-shareshelf.tt [new file with mode: 0644]
koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tt
opac/opac-shareshelf.pl [new file with mode: 0755]