Skip to content

fix(DM01-6409): prevent collaborator owner escalation - #656

Open
liuwei08 wants to merge 1 commit into
masterfrom
fix/DM01-6409
Open

liuwei08 wants to merge 1 commit into
masterfrom
fix/DM01-6409

Conversation

@liuwei08

Copy link
Copy Markdown
Contributor

Project Administrators can promote themselves or another collaborator to Owner through the collaborator PUT endpoint, which grants Owner-only project deletion and visibility permissions. This change rejects PUT requests that assign the Owner role, matching the existing POST restriction, and adds a regression test that verifies an Administrator cannot promote themselves and their stored role remains unchanged.

Jira: DM01-6409

Validation:

  • python3 -m py_compile src/api/handlers/projects/collaborators.py infrabox/test/api/collaborators_test.py
  • git diff --check
  • API Docker Compose test was attempted with build 3091 but could not start because Docker Hub token requests for the legacy Postgres, OPA, and Debian base images returned EOF; CI should run the integration test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant