mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-05 07:19:49 +00:00
FIX [parcours][rights] user with only simple view rights cannot create new parcours.
This commit is contained in:
parent
51681edda7
commit
9465f26f09
@ -248,6 +248,8 @@ class AccompanyingCourseController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function newAction(Request $request): Response
|
public function newAction(Request $request): Response
|
||||||
{
|
{
|
||||||
|
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::CREATE);
|
||||||
|
|
||||||
$period = new AccompanyingPeriod();
|
$period = new AccompanyingPeriod();
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
|
||||||
|
@ -17,12 +17,14 @@
|
|||||||
class="btn btn-cancel">{{ 'Person details'|trans }}
|
class="btn btn-cancel">{{ 'Person details'|trans }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_CREATE') %}
|
||||||
<li>
|
<li>
|
||||||
<a class="btn btn-create"
|
<a class="btn btn-create"
|
||||||
href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}" role="button">
|
href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}" role="button">
|
||||||
{{ 'Create an accompanying period'|trans }}
|
{{ 'Create an accompanying period'|trans }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{# Disabled dropdown
|
{# Disabled dropdown
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user