fix: login before check should be inclusive (#19974)
e.g. if login_before hour is 6 and it's 6:30 then it should be blocked. related :) - https://fhur.me/posts/always-use-closed-open-intervals
This commit is contained in:
parent
c525268084
commit
1f6fdebff6
1 changed files with 1 additions and 1 deletions
|
|
@ -307,7 +307,7 @@ class LoginManager:
|
|||
|
||||
current_hour = int(now_datetime().strftime("%H"))
|
||||
|
||||
if login_before and current_hour > login_before:
|
||||
if login_before and current_hour >= login_before:
|
||||
frappe.throw(_("Login not allowed at this time"), frappe.AuthenticationError)
|
||||
|
||||
if login_after and current_hour < login_after:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue