mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-02 22:17:45 +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
|
||||
{
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::CREATE);
|
||||
|
||||
$period = new AccompanyingPeriod();
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
|
@ -17,12 +17,14 @@
|
||||
class="btn btn-cancel">{{ 'Person details'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_CREATE') %}
|
||||
<li>
|
||||
<a class="btn btn-create"
|
||||
href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}" role="button">
|
||||
{{ 'Create an accompanying period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{# Disabled dropdown
|
||||
<li class="dropdown">
|
||||
|
Loading…
x
Reference in New Issue
Block a user