feat: add team support to cm

This commit is contained in:
2026-01-17 22:37:48 +01:00
parent a5bbc41dfd
commit e8d5d0fa0c
14 changed files with 325 additions and 54 deletions

View File

@@ -325,7 +325,10 @@ public class CompetitionService {
}))
.chain(model -> {
model.setFname(data.getFname());
model.setLname(data.getLname());
if (data.getLname().equals("__team"))
model.setLname("_team");
else
model.setLname(data.getLname());
model.setGenre(data.getGenre());
model.setClub(data.getClub());
model.setCountry(data.getCountry());
@@ -467,7 +470,8 @@ public class CompetitionService {
.call(cm -> membreService.getById(combId)
.invoke(Unchecked.consumer(model -> {
if (model == null)
throw new DNotFoundException(String.format(trad.t("le.membre.n.existe.pas"), combId));
throw new DNotFoundException(
String.format(trad.t("le.membre.n.existe.pas"), combId));
if (!securityCtx.isInClubGroup(model.getClub().getId()))
throw new DForbiddenException();
})))