Skip to content

security(company-os): any company member can change the CEO designation #20542

Closed

Description

@mrveiss

autobot-backend/llc/api/company_ceo.py PUT and DELETE (lines 116, 164) check company access only (assert_company_access), so any member of a company can change or clear its CEO. #15945 and the CompanySettings mockup say owners and admins only. Found while building the screen; read from the code, not exercised.

Acceptance criteria

  • Changing or clearing the CEO requires the owner or admin rule, with a test that a member is refused.
  • The screen hides or disables the controls for a member, from the same server fact.

Activity

  1. mrveiss commented on Nov 2, 2026

    @mrveiss
    OwnerAuthor

    Part of this landed in the merge train (PR #20594, 655489c4e6) via #20559: autobot-backend/llc/api/company_ceo.py set_company_ceo and clear_company_ceo call _require_owner_or_admin (require_company_admin_unless_platform, 403 "Only a company owner or admin may change the CEO"); tests in autobot-backend/llc/tests/test_company_ceo_routes_15872.py. AC1 is met in code. Stays open: AC2 (the screen hides or disables the controls for a member) has no change in that PR.

  2. mrveiss commented on Nov 8, 2026

    @mrveiss
    OwnerAuthor

    Closed with proof of implementation. Landed via train #21125, merge commit 77eaa31 (PR #21000).
    Gate 2: check-issue-close-refs.sh 20542 clear

    • "Changing or clearing the CEO requires the owner or admin rule, with a test that a member is refused." - done: llc/api/company_ceo.py PUT/DELETE use require_company_admin_unless_platform after assert_company_access (commit c3e0f9b); test_company_ceo_routes_15872.py::test_a_member_cannot_set_or_clear_the_ceo.
    • "The screen hides or disables the controls for a member, from the same server fact." - done: CompanyCeoCard.vue shows ceo-change only when canChange (from viewerCanManage); CompanyCeoCard.test.ts 'hides set and clear when the server says no'.

    Both boxes were already ticked; re-verified against main.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions