24,6 → 24,8 |
import ak.kickup.util.UserException; |
import ak.kickup.core.model.Act; |
import ak.kickup.core.model.ActManager; |
import ak.kickup.core.model.EventManager; |
import ak.kickup.core.model.ParticipantManager; |
|
public final class AdminActAction |
extends Action |
61,6 → 63,12 |
Long actId = StringConverter.parseLong(theForm.get("id")); |
Act act = ActManager.getInstance().get(actId); |
|
if(!EventManager.getInstance().allowDeleteAct(act)) |
throw new UserException("ak.kickup.core.act.delete.usedbyevent"); |
|
if(!ParticipantManager.getInstance().allowDeleteAct(act)) |
throw new UserException("ak.kickup.core.act.delete.usedbyparticipant"); |
|
ActManager.getInstance().delete(act); |
response.sendRedirect(BackPath.findBackPath(request).getBackwardUrl()); |
return null; |