Skip to content

Commit

Permalink
Update mxcubeweb/core/components/user/usermanager.py
Browse files Browse the repository at this point in the history
Co-authored-by: Marcus Oscarsson <[email protected]>
  • Loading branch information
meguiraun and marcus-oscarsson authored Sep 2, 2024
1 parent 7df3ad8 commit a8e938a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mxcubeweb/core/components/user/usermanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,11 @@ def _login(self, login_id: str, password: str):
raise Exception("Remote access disabled")

# Only allow remote logins with existing sessions
if self.app.lims.lims_valid_login(login_res)
if (
self.app.lims.lims_valid_login(login_res)
and is_local_host()
and HWR.beamline.lims.loginType.lower() != "user"
):
and is_local_host()
and HWR.beamline.lims.loginType.lower() != "user":
msg = "[LOGIN] Valid login from local host (%s)" % str(info)
Expand Down

0 comments on commit a8e938a

Please sign in to comment.