This commit is contained in:
gsinghpal
2026-03-09 15:21:22 -04:00
parent a3e85a23ef
commit acd3fc455e
243 changed files with 20459 additions and 4197 deletions

View File

@@ -244,14 +244,15 @@ class FusionClockAPI(http.Controller):
location, distance, err, method = self._verify_location(latitude, longitude, employee, client_ip)
if not location:
# Log geofence violation
err_msg = self._location_error_message(err, distance)
err_msg += f" (Your IP: {client_ip})"
self._log_activity(
employee, 'outside_geofence',
self._location_error_message(err, distance),
err_msg,
latitude=latitude, longitude=longitude, distance=distance, source=source,
)
return {
'error': self._location_error_message(err, distance),
'error': err_msg,
'allowed': False,
'error_type': err,
}