fix(campaigns,tests): admin cannot create campaigns, manager can delete unstarted tests, intensify red/blue team colors
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
Aegis CI / lint-and-test (push) Has been cancelled
Snyk Security Scan / Python vulnerabilities (backend) (push) Has been cancelled
Snyk Security Scan / npm vulnerabilities (frontend) (push) Has been cancelled
Snyk Security Scan / Docker image vulnerabilities (backend) (push) Has been cancelled
- Campaign creation and generate-from-threat-actor now use the strict
role check — admin no longer gets a free pass into campaign content,
same principle already applied to test-template creation.
- New manager-only DELETE /tests/{id}: removes a standalone test still
in draft (not started, not linked to any campaign).
- Replaced the orange/indigo stand-ins used across team badges, tabs,
action buttons, and timers with true red/blue so Red Team and Blue
Team read unambiguously at a glance.
This commit is contained in:
@@ -39,6 +39,8 @@ DUMMY_ID = str(uuid.uuid4())
|
||||
("post", "/api/v1/tests", {"technique_id": DUMMY_ID, "name": "x"}),
|
||||
("post", "/api/v1/tests/from-template", {"template_id": DUMMY_ID, "technique_id": DUMMY_ID}),
|
||||
("post", "/api/v1/tests/import-rt", {"name": "x", "techniques": []}),
|
||||
("post", "/api/v1/campaigns", {"name": "x"}),
|
||||
("post", f"/api/v1/campaigns/from-threat-actor/{DUMMY_ID}", None),
|
||||
],
|
||||
)
|
||||
def test_admin_forbidden(client, auth_headers, method, path, payload):
|
||||
|
||||
Reference in New Issue
Block a user