feat: group name unique per org

Instead of group names being wholly unique (enforced by the db), group names are unique within the org (enforced by endpoint logic).
This commit is contained in:
Chris Milne 2026-06-15 11:10:02 +01:00
parent 3f7abc5986
commit dad23733e8
3 changed files with 52 additions and 1 deletions

View file

@ -283,6 +283,15 @@ async def test_post_group_conflict(default_client: AsyncClient):
assert resp.status_code == 409
@pytest.mark.anyio
async def test_post_group_non_conflict(default_client: AsyncClient):
resp = await default_client.post(
"/iam/group", json={"organisation_id": 2, "name": "Org One Group"}
)
assert resp.status_code == 201
@pytest.mark.anyio
async def test_put_group_perm_success(default_client: AsyncClient):
resp = await default_client.put(