MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _rusense_node_label

Function _rusense_node_label

webapp_modern.py:837–844  ·  view source on GitHub ↗

Friendly node name from config (set in the Settings floor plan), else #id. Persisted in rusense_node_names so alerts say "Living room" not "#2".

(nid)

Source from the content-addressed store, hash-verified

835 tok = _kiosk_token()
836 if not tok:
837 return False
838 supplied = request.cookies.get(_KIOSK_COOKIE) or request.args.get('kiosk_token') or ''
839 return bool(supplied) and hmac.compare_digest(str(supplied), tok)
840
841
842@app.before_request
843def check_authentication():
844 """Enforce authentication on all endpoints when auth is configured."""
845 path = request.path
846 if not auth_mgr.is_configured():
847 # No local login — everyone is otherwise allowed. But the two

Callers 1

_rusense_check_onceFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected