Cover the virtual-entity permission resolution and the RBAC validators with tests
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
BA-7297 에서 컴포넌트 테스트의 거부 단언 18개를 뺐고 (vfolder_v2 5, model_card 6, project 5, session_v2 2), 그 뒤로 권한 거부를 검증하는 것이 없다. 컴포넌트 픽스처를 켜는 대신 제자리에서 덮는다.
왜 컴포넌트가 아닌가: tests/component/conftest.py 가 ProcessorDependencies 를 만들 때 validators=ActionValidators() 를 인자 없이 넘겨 전 필드가 빈 리스트다. 그것을 채우려면 지금 통과 중인 컴포넌트 테스트 전부가 처음으로 권한 검사를 받게 되고, 막히는 것마다 픽스처에 권한 설정을 채워야 한다. 그리고 tests/component/AGENTS.md 는 비즈니스 로직을 unit 에 두라고 한다 - 권한 거부는 validator 의 동작이다.
할 일 - validator 층으로 축소 (BA-7593 재정의). 해석층(실 DB)은 BA-7593 이 자체 테스트로 흡수했다: test_own_and_govern_checks, test_own_check_query(구 쿼리 등가성 상시 검증 + 벤치), test_permission_field_scopes, test_share_field_scopes. 남는 범위는 validator 가 owned_permissions/governed_permissions 의 mask 를 covers 로 판정해 액션 거부로 옮기는지다 - single-entity/bulk/relation 짝, 부분 bulk 의 거부 부분집합, enforcement 비활성, superadmin 스킵.
JIRA Issue: BA-7442
Contributor guide
Research direction
Read tests/component/AGENTS.md and tests/component/conftest.py first to understand why this belongs in unit-level validator tests rather than component fixtures. Use the existing test_own_and_govern_checks, test_own_check_query, test_permission_field_scopes, and test_share_field_scopes tests to establish the interpretation boundary. Done means coverage for single-entity, bulk, relation, partial-bulk, disabled-enforcement, and superadmin cases, including denied actions from permission masks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authorization, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100