Repository navigation
feat: 権限システムの実装 - #16
Merged
Merged
Conversation
XOR 単一テーブル設計をやめ、ユーザー付与(project_members)と OIDC グループ付与(project_group_roles)を独立したテーブルに分割。 GetProjectMember・ListProjectGroupRolesByGroups クエリを追加し sqlc 再生成。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ProjectMember をユーザー専用に整理し、OIDCRole フィールドを削除。 ProjectGroupRole 型と ProjectGroupRoleRepository を追加。 ForbiddenError を domain に追加。 policy 判定(グローバル admin / owner / role→permission)を Principal.Can として domain に集約。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
member.go を user-only に作り直し GetByUser を追加。 group_role.go を新規作成し ProjectGroupRoleRepository を実装。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
IssueSessionToken のシグネチャに roles []string を追加し JWT クレームに格納。 ParseSessionToken も roles を返すよう変更。 context.go に WithRoles / Roles を追加し、 interceptor でトークンパース時に ctx へセット。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
userRepo を廃止し auth.Roles(ctx) で OIDC ロールを取得。 GetByUser と ListByGroups を errgroup で並列実行し granted roles を収集。 policy 判定は Principal.Can に委譲。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ApplicationService と ProjectService に Authorizer を注入し Write / Delete 操作に認可チェックを追加。 handler に connectError ヘルパーを追加し ForbiddenError を PermissionDenied に変換。gateway.go で groupRoleRepo を追加し authz.New の引数を更新。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nomanoma121
marked this pull request as ready for review
October 5, 2026 17:32
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.
No description provided.