pull branch romain

This commit is contained in:
barillote 2025-04-08 08:20:40 +02:00
parent 09b84379bf
commit 30f58aca76
2 changed files with 3 additions and 13 deletions

View File

@ -19,8 +19,10 @@ class ProfileController extends AbstractController
#[Route('/profile', name: 'app_profile')]
public function profile(EntityManagerInterface $entityManager): Response
{
// Charger l'utilisateur connecté
$user = $this->getUser();
// Vérifiez les rôles si nécessaire
if (!$user) {
throw $this->createAccessDeniedException('Vous devez être connecté pour accéder à cette page.');
}

View File

@ -56,23 +56,11 @@
</table>
</div>
{% if 'ROLE_INTERN' in app.user.roles %}
<div class="mt-4">
<button type="submit" class="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded-full">
<i class="fas fa-check-circle"></i> Valider la sélection
</button>
</div>
</form>
{% endif %}
{% if 'ROLE_ADMIN' in app.user.roles %}
<!-- Lien pour ajouter un nouveau diplôme -->
<div class="mt-4">
<a href="{{ path('app_degree_new') }}" class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4
rounded-full">
<a href="{{ path('app_degree_new') }}" class="bg-teal-500 hover:bg-teal-600 text-white py-2 px-4 rounded-full">
<i class="fas fa-plus-circle"></i> Ajouter un nouveau diplôme
</a>
</div>
{% endif %}
</div>
{% endblock %}