feat(project): enforce activation guards

This commit is contained in:
sechmachine
2026-08-15 01:29:53 +07:00
parent 213a889c8f
commit dbf12023c2
8 changed files with 151 additions and 9 deletions
@@ -6,6 +6,9 @@
<h1 th:text="${project.name}">Project</h1>
<p th:text="${project.description}"></p>
<dl><dt>Status</dt><dd th:text="${project.status}"></dd><dt>Mentor</dt><dd th:text="${project.mentorName}"></dd><dt>Leader</dt><dd th:text="${project.leaderName}"></dd></dl>
<form th:if="${project.canManage and project.status == 'PLANNED'}" th:action="@{/projects/{id}/activate(id=${project.id})}" method="post">
<button type="submit">Activate</button>
</form>
<nav aria-label="Project sections"><a th:href="@{/projects/{id}/members(id=${project.id})}">Members</a> <a th:href="@{/projects/{id}/leadership(id=${project.id})}">Leadership</a></nav>
</main>
</body>