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)
| 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 |
| 843 | def 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 |
no test coverage detected