mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 22:34:24 +00:00
wip.. corrections
This commit is contained in:
parent
15ff92257c
commit
a10d48642f
@ -50,7 +50,6 @@
|
|||||||
<td>
|
<td>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
<li>
|
<li>
|
||||||
{#
|
|
||||||
{% if is_granted('CHILL_EVENT_SEE_DETAILS', participation.event) %}
|
{% if is_granted('CHILL_EVENT_SEE_DETAILS', participation.event) %}
|
||||||
<a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id } ) }}" class="sc-button black">
|
<a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id } ) }}" class="sc-button black">
|
||||||
{{ 'See'|trans }}
|
{{ 'See'|trans }}
|
||||||
@ -66,6 +65,7 @@
|
|||||||
{{ 'Edit'|trans }}
|
{{ 'Edit'|trans }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{#
|
||||||
#}
|
#}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -9,6 +9,7 @@ use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
|
|||||||
use Chill\EventBundle\Entity\Event;
|
use Chill\EventBundle\Entity\Event;
|
||||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
|
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||||
use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface;
|
use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
@ -86,11 +87,11 @@ class EventVoter extends AbstractChillVoter implements ProvideRoleHierarchyInter
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($subject instanceof Event) {
|
if ($subject instanceof Event) {
|
||||||
if ($subject->getPerson() === null) {
|
if ($subject->getId() === null) {
|
||||||
throw new \LogicException("You should associate a person with event "
|
throw new \LogicException("You should associate a person with event "
|
||||||
. "in order to check autorizations");
|
. "in order to check autorizations");
|
||||||
}
|
}
|
||||||
$person = $subject->getPerson();
|
$person = $subject->getId(); // liaison event --> person
|
||||||
|
|
||||||
} elseif ($subject instanceof Person) {
|
} elseif ($subject instanceof Person) {
|
||||||
$person = $subject;
|
$person = $subject;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user