-
Notifications
You must be signed in to change notification settings - Fork 5
[feat] differ access depends on permissions #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SHIM-JINSEO
wants to merge
2
commits into
master
Choose a base branch
from
131-feat-differ-access-depends-on-permissions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
멤버 기본 권한을 MEMBER_UPDATE로 상향 — 권한 범위 재확인 권고
MEMBER_UPDATE의 범위가 “자기 자신 정보 수정”으로 제한돼 있는지 확인이 필요합니다. 타인 멤버 정보/역할까지 갱신 가능한 의미라면 기본 부여는 위험합니다. 서버는 주체 검증(userId === me)으로 강제하고, 프런트는 해당 권한으로 노출되는 UI(예: 멤버 편집 버튼)가 자기 자신일 때만 활성화되도록 가드가 필요합니다.
또한 멤버 기본 권한 변경은 다른 그룹 생성 플로우(노션 외 경로)에도 동일하게 반영되어야 합니다. 중복 정의를 방지하려면 공용 기본 권한 상수로 추출하는 것을 권장합니다.
적용 예(diff: 해당 구간에서 상수 사용으로 치환):
상수 정의(파일 상단에 추가):
검증 스크립트(멤버 업데이트 권한이 노출/행동 가드에 연결되는지 점검):
🏁 Script executed:
Length of output: 2556
멤버 기본 권한 MEMBER_UPDATE 부여 시 UI/서버 가드 미구현 확인 — 필수 수정 필요
rg 스크립트 결과,
RolePermissions.MEMBER_UPDATE사용처는 확인되나currentUser/me/isSelf검사 로직이 전혀 구현되어 있지 않습니다.해당 권한이 타인 정보·역할 변경까지 허용될 가능성이 있어 보안상 치명적이므로,
userId === me검증 로직이 반드시 적용되었는지 확인 및 보강또한, 향후 다른 그룹 생성 플로우에서도 중복 정의를 방지하기 위해 기본 권한을 공용 상수로 추출할 것을 권장합니다.
— 수정 필요 위치
— 예시 diff
— UI 가드 예시
위 보안 이슈는 즉시 반영이 필요합니다.
🤖 Prompt for AI Agents