施工(HEL-226): 实现登录门户与本机免密切换账号
用设备 Cookie 和授权表记住本机已验证账号,登录页按确认样图做成门户,不再把密码写进浏览器。 Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
Cursor
multica-agent
parent
8a5e78f022
commit
f0a1adf52f
@@ -50,7 +50,13 @@ def _owner(path: str) -> str:
|
||||
|
||||
|
||||
def _role(method: str, path: str) -> str:
|
||||
if path == "/api/health" or path in {"/api/auth/register", "/api/auth/login"}:
|
||||
if path == "/api/health" or path in {
|
||||
"/api/auth/register",
|
||||
"/api/auth/login",
|
||||
"/api/auth/accounts",
|
||||
"/api/auth/switch",
|
||||
"/api/auth/forget",
|
||||
}:
|
||||
return "public"
|
||||
from api_access import required_role
|
||||
|
||||
|
||||
Reference in New Issue
Block a user