diff --git a/src/Controller/Api/ResubscribeEmailController.php b/src/Controller/Api/ResubscribeEmailController.php index 8c2746358ed..d8d6b107549 100644 --- a/src/Controller/Api/ResubscribeEmailController.php +++ b/src/Controller/Api/ResubscribeEmailController.php @@ -9,7 +9,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; -#[IsGranted('IS_AUTHENTICATED_FULLY')] +#[IsGranted('ROLE_USER')] #[Route(path: '/resubscribe-email', name: 'api_resubscribe_email_payload', methods: ['GET'])] #[Route(path: '/v3/resubscribe-config', methods: ['GET'])] class ResubscribeEmailController extends AbstractController diff --git a/src/Controller/OAuth/SsoController.php b/src/Controller/OAuth/SsoController.php index d719058ec44..3fc07205974 100644 --- a/src/Controller/OAuth/SsoController.php +++ b/src/Controller/OAuth/SsoController.php @@ -12,7 +12,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; -#[IsGranted('IS_AUTHENTICATED_FULLY')] +#[IsGranted('ROLE_USER')] #[Route(path: '/sso/{uuid}', name: 'app_front_oauth_sso', requirements: ['uuid' => '%pattern_uuid%'], methods: ['GET'])] class SsoController extends AbstractController { diff --git a/src/Controller/Renaissance/Adherent/EventController.php b/src/Controller/Renaissance/Adherent/EventController.php index 2fe2ac26ff9..485eacd0382 100644 --- a/src/Controller/Renaissance/Adherent/EventController.php +++ b/src/Controller/Renaissance/Adherent/EventController.php @@ -31,7 +31,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; use Symfony\Contracts\Translation\TranslatorInterface; -#[IsGranted('ROLE_RENAISSANCE_USER')] +#[IsGranted('ROLE_USER')] #[Route(path: '/espace-adherent/evenements', name: 'app_renaissance_event')] class EventController extends AbstractController { diff --git a/src/Controller/Renaissance/Election/LocalPollElectionController.php b/src/Controller/Renaissance/Election/LocalPollElectionController.php index 35b26ff5e10..771067dbc63 100644 --- a/src/Controller/Renaissance/Election/LocalPollElectionController.php +++ b/src/Controller/Renaissance/Election/LocalPollElectionController.php @@ -11,7 +11,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; -#[IsGranted('ROLE_RENAISSANCE_USER')] +#[IsGranted('ROLE_USER')] #[Route(path: '/election-locale', name: 'app_renaissance_local_election_home', methods: 'GET')] class LocalPollElectionController extends AbstractController { diff --git a/src/Controller/Renaissance/Election/PollElectionController.php b/src/Controller/Renaissance/Election/PollElectionController.php index 5126835b06c..be10687e1ab 100644 --- a/src/Controller/Renaissance/Election/PollElectionController.php +++ b/src/Controller/Renaissance/Election/PollElectionController.php @@ -8,7 +8,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; -#[IsGranted('ROLE_RENAISSANCE_USER')] +#[IsGranted('ROLE_USER')] #[Route(path: '/changement-des-statuts/{uuid}', name: 'app_poll_election')] class PollElectionController extends AbstractController { diff --git a/src/Controller/Renaissance/Election/SasElectionController.php b/src/Controller/Renaissance/Election/SasElectionController.php index f686a004808..a5fe96b84ff 100644 --- a/src/Controller/Renaissance/Election/SasElectionController.php +++ b/src/Controller/Renaissance/Election/SasElectionController.php @@ -8,7 +8,7 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; -#[IsGranted('ROLE_RENAISSANCE_USER')] +#[IsGranted('ROLE_USER')] #[Route(path: '/election-sas/{uuid}', name: 'app_sas_election')] class SasElectionController extends AbstractController { diff --git a/src/Entity/Adherent.php b/src/Entity/Adherent.php index 0692f0f4b90..3707f73cc0e 100644 --- a/src/Entity/Adherent.php +++ b/src/Entity/Adherent.php @@ -767,10 +767,6 @@ public function getRoles(): array $roles[] = 'ROLE_CORRESPONDENT'; } - if ($this->isRenaissanceAdherent() || $this->isRenaissanceSympathizer()) { - $roles[] = 'ROLE_RENAISSANCE_USER'; - } - // Must be at the end as it uses $roles array if ($this->isAdherentMessageRedactor($roles)) { $roles[] = 'ROLE_MESSAGE_REDACTOR'; diff --git a/templates/adherent/my_activity_events.html.twig b/templates/adherent/my_activity_events.html.twig index 60271abec95..3a3600930d1 100644 --- a/templates/adherent/my_activity_events.html.twig +++ b/templates/adherent/my_activity_events.html.twig @@ -54,7 +54,7 @@ {% if event is instanceof('App\\Entity\\Event\\CommitteeEvent') and event.committee %}
Organisé par le comité {{ event.committee.name }}
{% elseif event.organizer %} -
Organisé par {{ is_granted('IS_AUTHENTICATED_FULLY') ? event.organizer.fullName : event.organizer.partialName }}
+
Organisé par {{ is_granted('ROLE_USER') ? event.organizer.fullName : event.organizer.partialName }}
{% endif %} diff --git a/templates/adherent_profile/activity/_events.html.twig b/templates/adherent_profile/activity/_events.html.twig index c5458a676e7..0fdeca1dcea 100644 --- a/templates/adherent_profile/activity/_events.html.twig +++ b/templates/adherent_profile/activity/_events.html.twig @@ -24,7 +24,7 @@ {% if event is instanceof('App\\Entity\\Event\\CommitteeEvent') and event.committee %}
Organisé par le comité {{ event.committee.name }} à {{ event.cityName }}
{% elseif event.organizer %} -
Organisé par {{ is_granted('IS_AUTHENTICATED_FULLY') ? event.organizer.fullName : event.organizer.partialName }} à {{ event.cityName }}
+
Organisé par {{ is_granted('ROLE_USER') ? event.organizer.fullName : event.organizer.partialName }} à {{ event.cityName }}
{% endif %}
@@ -75,7 +75,7 @@ {% if event is instanceof('App\\Entity\\Event\\CommitteeEvent') and event.committee %}
Organisé par le comité {{ event.committee.name }} à {{ event.cityName }}
{% elseif event.organizer %} -
Organisé par {{ is_granted('IS_AUTHENTICATED_FULLY') ? event.organizer.fullName : event.organizer.partialName }} à {{ event.cityName }}
+
Organisé par {{ is_granted('ROLE_USER') ? event.organizer.fullName : event.organizer.partialName }} à {{ event.cityName }}
{% endif %}
diff --git a/templates/events/_header.html.twig b/templates/events/_header.html.twig index 0e8efd365c5..0bdf76c2ae9 100644 --- a/templates/events/_header.html.twig +++ b/templates/events/_header.html.twig @@ -6,7 +6,7 @@
{% if event.organizer %}
- Organisé par {{ is_granted('IS_AUTHENTICATED_FULLY') ? event.organizer.fullName : event.organizer.partialName }} + Organisé par {{ is_granted('ROLE_USER') ? event.organizer.fullName : event.organizer.partialName }} {% if committee is defined and committee %} du comité @@ -49,7 +49,7 @@ {% endif %} {% endif %} {% endif %} - {% if is_granted('IS_AUTHENTICATED_FULLY') %} + {% if is_granted('ROLE_USER') %}
{{ include('components/participants.html.twig') }} {{ 'participants_count'|trans({ count: event.participantsCount }) }} diff --git a/templates/renaissance/adherent/events/my_events/partials/event_grids.html.twig b/templates/renaissance/adherent/events/my_events/partials/event_grids.html.twig index fb874438e05..5934a57854b 100644 --- a/templates/renaissance/adherent/events/my_events/partials/event_grids.html.twig +++ b/templates/renaissance/adherent/events/my_events/partials/event_grids.html.twig @@ -38,7 +38,7 @@ {% if event is instanceof('App\\Entity\\Event\\CommitteeEvent') and event.committee %} Par le comité {{ event.committee.name }} {% elseif event.organizer %} - Par {{ is_granted('IS_AUTHENTICATED_FULLY') ? event.organizer.fullName : event.organizer.partialName }} + Par {{ is_granted('ROLE_USER') ? event.organizer.fullName : event.organizer.partialName }} {% endif %}

@@ -83,4 +83,3 @@ } %} {% endif %} {% endif %} - diff --git a/templates/renaissance/adherent/events/partials/_search_result.html.twig b/templates/renaissance/adherent/events/partials/_search_result.html.twig index b7daec37130..df56e4b886c 100644 --- a/templates/renaissance/adherent/events/partials/_search_result.html.twig +++ b/templates/renaissance/adherent/events/partials/_search_result.html.twig @@ -37,7 +37,7 @@ {% if event is instanceof('App\\Entity\\Event\\CommitteeEvent') and event.committee %} Par le comité {{ event.committee.name }} {% elseif event.organizer %} - Par {{ is_granted('IS_AUTHENTICATED_FULLY') ? event.organizer.fullName : event.organizer.partialName }} + Par {{ is_granted('ROLE_USER') ? event.organizer.fullName : event.organizer.partialName }} {% endif %}

diff --git a/templates/search/_events.html.twig b/templates/search/_events.html.twig index c9b3acd6080..c51aaf6bef8 100644 --- a/templates/search/_events.html.twig +++ b/templates/search/_events.html.twig @@ -58,7 +58,7 @@ Événement complet
{% endif %} - {% if is_granted('IS_AUTHENTICATED_FULLY') %} + {% if is_granted('ROLE_USER') %}
{{ 'participants_count'|trans({ count: event.participantsCount }) }}