refactor(5-1): 층 쓰기 권한 판단 한 벌 — M02_Layer_Access.can_write · 거울 시험

- M02_Layer_Access 에 can_write(session, here) 더함(옛 Library_Delete.can_write 몸 옮김)
- Library_Delete.can_write = access.can_write 별칭 · Library_Same_Router._can_write 는 access.can_write 부름(옛 이름 걷음은 5-8)
- 새 거울 시험 test_858_1_access_mirror — 화면 accessFor ↔ 서버 can_write · grant 409 · 88 갈래 같음
- M02_MasterTemplete_Layer.ts 머리 글 한 줄(짝 시험 자리 · 코드 불변)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-17 19:04:01 +09:00
co-authored by Claude Opus 5.5
parent 0e8319ef6b
commit e13c23c4e3
5 changed files with 104 additions and 11 deletions
+1 -9
View File
@@ -22,8 +22,6 @@ from datetime import datetime
from pathlib import Path
from typing import Any
from fastapi import HTTPException
from common_util.common_util_json import atomic_write_json
from M02_MasterTemplete import M02_Labor_Ref as refs
from M02_MasterTemplete import M02_Layer_Access as access
@@ -37,13 +35,7 @@ _ADD = re.compile(r"^add:#(\d+)(.*)$")
_PATCH = ("덮개", "고름", "자재표시")
def can_write(session: dict[str, Any] | None, at: refs.Here) -> bool:
if session is None:
return False
try:
return access.grant(session, at[0], at[1]).write
except HTTPException:
return False
can_write = access.can_write # 쓰기 판단 한 벌(858-B) — 이름은 5-8 에서 걷음
def _hits(doc: dict[str, Any], rids: dict[str, str]) -> list[tuple[str, str]]: