You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
security(company-os): any company member can change the CEO designation #20542
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.
Part of this landed in the merge train (PR #20594, 655489c4e6) via #20559: autobot-backend/llc/api/company_ceo.pyset_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.
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.
Activity
mrveiss commentedon Nov 2, 2026
Part of this landed in the merge train (PR #20594,
655489c4e6) via #20559:autobot-backend/llc/api/company_ceo.pyset_company_ceoandclear_company_ceocall_require_owner_or_admin(require_company_admin_unless_platform, 403 "Only a company owner or admin may change the CEO"); tests inautobot-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.fix(gui): hide the CEO designation control from non-admins (#20542)
mrveiss commentedon Nov 8, 2026
Closed with proof of implementation. Landed via train #21125, merge commit 77eaa31 (PR #21000).
Gate 2:
check-issue-close-refs.sh 20542clearllc/api/company_ceo.pyPUT/DELETE userequire_company_admin_unless_platformafterassert_company_access(commit c3e0f9b);test_company_ceo_routes_15872.py::test_a_member_cannot_set_or_clear_the_ceo.CompanyCeoCard.vueshowsceo-changeonly whencanChange(fromviewerCanManage);CompanyCeoCard.test.ts'hides set and clear when the server says no'.Both boxes were already ticked; re-verified against main.