feat: 외부 도메인 발급을 신청 흐름으로 편입 - #132
Merged
Merged
Conversation
yessjun
force-pushed
the
feat/domain-request-kind
branch
from
September 17, 2026 06:09
0bc39ef to
01ab0ee
Compare
The domain kind takes its organisation from the root it is asked under, so asking the applicant for one too would let a form carry two answers with nothing downstream able to tell which was meant. orgId is now optional and resolveOrg() asks the handler first, falling back to the field for every other kind and refusing when neither supplies one. The call moved after the kind's own validation: working the organisation out of a root that does not exist would answer with that failure instead of the field error the applicant needs to read. AdminDomainView.vmId and vmName become nullable in the same unit. External names have no virtual machine and the rows were already going out null, so the contract was claiming something the server does not send.
Reading a name's records asked whether the account may act in the organisation, because every previous caller of that scope check was a write and a write is what it was built for. An organisation viewer got a 404 for its own institution's names: the row stood in the listing and the drawer refused to open it. The resolution splits in two. A write still asks operates(); a read asks reads(), which is every organisation the account holds any role in. The two sets differ only once a read-only role exists, which is exactly why the distinction is written down on AuthenticatedUser and why collapsing them here went unnoticed. Both tests fail without the fix, and the one that matters fails with the 404 the viewer was getting.
Making orgId optional moved its refusal from the annotation into the service, and the service ran after the kind had already thrown. A body missing the organisation and something else got told about the something else, then about the organisation on the next attempt: two round trips where the annotation had managed one. Whether the field is required is knowable without reading the form, so it is asked first and joins the same 422 as every other missing field. Which organisation can only be worked out after the kind's own fields are known good, because for a name it means reading the root that was named, so that stays where it is. This platform's own console never produced the shape, since it refuses all four fields client-side, which is the reason it would have gone unnoticed.
Six statements the round made false or left imprecise, none of which any gate could catch. DnsDomainService still opened with "no approval anywhere in here", which is the position this round reversed; the root now decides. A javadoc block whose method had moved to DomainIssuancePolicy was left behind with nothing under it. CreateRequestRequest claimed the service refuses a body whose type and nested member disagree, and no such check has ever existed. The renewal policy's root row never moved updated_at, harmless while nothing could edit a root and a false claim the moment the policy became editable. An approval that met a root deleted since submission answered a field error naming a box on the request form, where the reviewer has no such box; it answers the conflict its sibling refusal already answered. V124's guard asserted the replacement token exists but not that it is unique, while replace() is global. V122's default said why existing rows stay open and not why new ones do, which is a separate decision.
A round merged while this one was open and took 0.79.0, so the version this branch publishes moves up rather than down. The spec is regenerated from the rebased tree and the permission fixture's header follows it. The rebase resolved the generated spec by taking main's copy, on the understanding that regenerating would replace it. Regenerating happened and committing it did not, so the tree carried a spec that disagreed with the version constant beside it.
The version this branch was holding landed on main from another round, so this one moves up rather than publishing a number that is already taken. The spec is regenerated from the rebased tree and the permission fixture's header follows it.
yessjun
force-pushed
the
feat/domain-request-kind
branch
from
September 17, 2026 06:59
d62a873 to
b0ea97e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 작업내용
POST /dns-domains폐지, 발급은POST /requests의domain항목으로 접수domain_request_details에 적재하고 승인 시점에 이름을 발급 (V124)assert_approved_request_is_granted()에 DOMAIN 분기 추가, 분기가 없으면 승인 커밋이 실패domain_roots.auto_approve가 true면 접수와 동시에 승인, false면 기존 승인 큐request_reviews.reviewer_idNOT NULL 해제, 외래 키는 유지RequestApproval로 분리POST /dns-domains/{domainId}/revive로 신설CreateRequest.orgId를 선택 항목으로 변경owningOrgId로 유도하고, 나머지는 종전대로 필수AdminDomainView.vmId와vmName을 nullable로 정정, 외부 도메인 행은 이미 null 전송updated_at이 갱신되지 않아 마지막 정책 변경 시각을 참칭하던 것⭐️ 검증
auto_approve컬럼을 넣지 않고 삽입해 기본값 자체를 검증💬 리뷰 포인트
orgId를 선택으로 바꾼 본문 모양GET /admin/domain-roots를 기관으로 좁히지 않은 범위