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>