Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Removing an organization member leaves the member's PATs and their policies behind

オープン
#1,970 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go

調査の方向性

Start in core/membership/org.go at cascadeRemovePrincipal and trace how RemoveOrganizationMember deletes the member’s organization policies. Compare that flow with the existing user-deletion path through userpat.Service.Delete, which marks a PAT deleted and removes its policies. The issue is done when removing a member also deletes that user’s PATs scoped to the organization and their policies, without affecting service users.

索引モデルが issue の本文から書いたものです。

説明

What happens

RemoveOrganizationMember deletes the member's own policies for the organization, but it does not touch the personal access tokens (PATs) the member created for that organization, nor the policies those PATs hold. PAT policies carry the PAT id as principal, so the principal filter in the removal cascade (core/membership/org.go, cascadeRemovePrincipal) never sees them.

Why it matters

  • The PAT grants nothing while the owner is out of the organization. resource.Service.CheckAuthz checks the PAT's own scope and then the owner's permission, and both must pass.
  • The organization's token list (SearchOrganizationPATs) still shows the PAT with its role, as if it worked.
  • When the owner is added back, the old PAT works again at once, within whatever the owner's new role allows. Nobody re-issued or re-approved it.
  • The PAT row and its policy rows stay behind for a user who is no longer a member.

Verified locally

  1. A member creates a PAT scoped to the organization with the viewer role. The PAT passes CheckResourcePermission.
  2. An owner removes the member with RemoveOrganizationMember. The PAT now fails the check and GetOrganization returns permission denied, but its policy row is still live and the token list still shows the PAT with the viewer role.
  3. The member is added back. The PAT passes the check again immediately.

Proposed fix

Run the PAT delete cascade for the member's PATs in that organization as part of the removal: list the user's PATs for the organization and, for each, call the same per-PAT delete that user deletion already uses (userpat.Service.Delete: mark the PAT deleted, then remove its policies). Only user principals are affected, since service users have no PATs.

主要言語
Go
スター
343
フォーク
48
平均マージ
2日 9時間
マージ済み PR(30日)
48

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

raystack/frontier のほかの issue

raystack/frontier の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。