Bug - 5511: Check for Change in Remote IP address for Session Security. Disable when remote ip address changes frequently.

To Test:
1) Enable the system preference SessionRestrictionByIP
2) Change your system IP. It will not checkout your system IP or signout.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug - 5511: Added new system preference: SessionRestrictionByIP

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug - 5511 [Followup]: Switched defults

Agree with Chris that the defualt should maintain the higher security
and not reduce it.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug - 5511 [Followup]: Missed Instance

There was an instance of the pragma missed which meant the the original
patch set didn't actually solve the problem in a large number of cases

This patch adds in the relevant statement.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Bug - 5511 [Followup]: QA Fixes

- Move database update entry to correct spot
- Fix version number in database update
- Fix capitalization in sys pref description
- Fix sequence in sysprefs.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 1861: There is a problem introduced with an earlier patch, on this patchset

-    $data{'userid'} = Generate_Userid($data{'borrowernumber'},
$data{'firstname'}, $data{'surname'}) if $data{'userid'} eq '';
+    $data{'userid'} = Generate_Userid( $data{'borrowernumber'},
$data{'firstname'}, $data{'surname'} )
+      if ( $data{'userid'} eq '' || Check_Userid( $data{'userid'} ) );

Check_Userid returns 1 if it is unique.  So this means unique userids
will always be discarded and new ones created.

This is why all the tests depending on a userid are now failing

To test

1/ run perl t/db_dependent/Serials_2.t
2/ Notice lots of tests fail
3/ OR Add a borrower with a userid set, notice the userid is ignored
and one is generated instead
4/ Apply patch
5/ Add a new borrower, notice the userid sticks (if it is unique)
6/ Run perl t/db_dependent/Serials_2.t notice tests pass
7/ Run perl t/db_dependent/Members.t notice tests still pass

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Bug 1861: Add 1 test to AddMember

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>