Skip to content

feat: expose apis for org management#1029

Draft
loadez wants to merge 3 commits into
mainfrom
feat/org-management-api
Draft

feat: expose apis for org management#1029
loadez wants to merge 3 commits into
mainfrom
feat/org-management-api

Conversation

@loadez
Copy link
Copy Markdown
Contributor

@loadez loadez commented May 15, 2026

📝 Description

✅ Checklist

  • I have tested this change
  • This change requires documentation update

@loadez loadez self-assigned this May 15, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Roadmap May 15, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4207363bfa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +9 to +11
import PipelinesAPI.Members.Authorize, only: [authorize_manage_people: 2]

plug(:authorize_manage_people)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate project role changes with project permission

Project-scoped role assignment is currently guarded by authorize_manage_people (organization.people.manage), but the RBAC gRPC server authorizes project role changes with project.access.manage when project_id is present (checked ee/rbac/lib/rbac/grpc_servers/rbac_server.ex, @manage_project_roles). This means users who are allowed to manage project access but not org people will be incorrectly blocked at the HTTP layer, while users with org-people manage but no project-access manage will hit backend denial and get a generic failure path.

Useful? React with 👍 / 👎.

Comment on lines +12 to +13
def authorize_manage_groups(conn, _opts) do
is_authorized?("organization.groups.manage", conn)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align groups-manage check with backend authorization

The API layer requires organization.groups.manage, but the groups gRPC server authorizes mutating calls with organization.people.manage (checked ee/rbac/lib/rbac/grpc_servers/groups_server.ex, @manage_groups_permission). That mismatch creates inconsistent behavior: a caller with only groups-manage can pass this plug and then fail downstream, while a caller with only people-manage is blocked here even though backend would permit the operation.

Useful? React with 👍 / 👎.

@loadez loadez force-pushed the feat/org-management-api branch from 4207363 to 6c94994 Compare May 15, 2026 10:43
@semaphoreio semaphoreio deleted a comment from chatgpt-codex-connector Bot May 15, 2026
@loadez loadez force-pushed the feat/org-management-api branch 4 times, most recently from 57a0bc4 to 11922e9 Compare May 18, 2026 16:36
loadez added 2 commits May 19, 2026 10:15
Credo flagged mass 55 (threshold 45). Reuse serialize_members
in process_list_members_response, delegate process_modify_role.
@loadez loadez force-pushed the feat/org-management-api branch from 11922e9 to 265b092 Compare May 19, 2026 13:18
is_authorized? duplicated across 4 authorize modules (mass 44x3).
Extract to SharedAuthorize.check_permission/2, delegates only.
@loadez loadez marked this pull request as draft May 19, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant