]> git.koha-community.org Git - koha.git/commit
Bug 20804: Add support for "days" to the timeout syspref
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 30 Jul 2020 13:15:46 +0000 (15:15 +0200)
committerAleisha Amohia <aleishaamohia@hotmail.com>
Tue, 17 Nov 2020 04:05:26 +0000 (17:05 +1300)
commit775f958575e462372517286e38cbf093da5bd53f
tree25dd0b89b6131e0403ff292dcebe3967f9b3948a
parenta57d0fe74597680ff24968e1596857c9a7133072
Bug 20804: Add support for "days" to the timeout syspref

If the timeout syspref did not contain an integer, or was not matching
integer.'d|D', then it "fallback" to 0

We can easily add support for hours and fallback to 600 if the value is
not correct.
It will prevent the session to timeout immediately

Test plan:
0. Do not apply the patches
1. Fill the timeout syspref with "5h"
2. Login
3. Click somewhere
=> Notice that the session timed out
4. Apply the patches, restart_all
5. Login
6. Click somewhere
=> You have 5 hours to enjoy Koha
7. Fill the pref with an incorrect value ("5x" for instance)
8. Logout, login
9. There is a warning in the log, and you have 10 minutes (600 secondes) to enjoy Koha

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 97b9eab178f0b45b38662747a4e009e71d8b73ff)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 78e8c65bf5fa8db6b9a8e8f3313359a4f295c00d)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
C4/Auth.pm