Added new quizz button and role
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
alter table role_privileges drop constraint role_privileges_privileges_check;
|
||||
alter table role_privileges add constraint role_privileges_privileges_check
|
||||
check (privileges in ('LIST_USERS','ADD_USERS','LIST_QUIZZ','CREATE_QUIZZ','VIEW_ALL_FORMS'));
|
||||
|
||||
insert into role_privileges VALUES
|
||||
((select id from roles where "name" = 'ADMIN'),'CREATE_QUIZZ');
|
||||
insert into role_privileges VALUES
|
||||
((select id from roles where "name" = 'ADMIN'),'VIEW_ALL_FORMS');
|
||||
@@ -17,6 +17,7 @@
|
||||
<li th:if="${#lists.isEmpty(editableQuizz)}">Aucun quizz de disponible malheureusement :(</li>
|
||||
<li th:each="q : ${editableQuizz}"><a th:href="@{/questions/quizz-edit/{id}(id=${q.id})}">Quizz <span th:text="${q.name}"/></a></li>
|
||||
</ul>
|
||||
<a sec:authorize="hasAuthority('CREATE_QUIZZ')" th:href="@{/questions/new-quizz}">Nouveau Quizz</a>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user