feat(training): delete group button (admin only) on Training page
- Backend DELETE /api/groups/<gid> (admin, own-org enforced via _get_owned_group); cascades removal of the group's sessions. GroupStore.delete added. - Training.vue: each group card gets a trash (Trash2 line icon) delete button shown only to admins (auth.isAdmin); confirm dialog; @click.stop so it doesn't navigate. Card restructured so the delete button is not inside the clickable router-link. - test_user_journey: trainee cannot delete (403), admin deletes, group gone (404). All suites pass. Rebuilt dist.
This commit is contained in:
@@ -95,3 +95,7 @@ class GroupStore:
|
||||
if not found:
|
||||
raise ValueError("persona not found")
|
||||
return self.groups.replace(gid, group)
|
||||
|
||||
def delete(self, gid: str) -> None:
|
||||
"""Hard-delete a group (personas/report included)."""
|
||||
self.groups.delete(gid)
|
||||
|
||||
Reference in New Issue
Block a user