mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
allow a user/referrer to see his own courses, even if the scope is not his own
This commit is contained in:
parent
949bdfd993
commit
7df70cab98
@ -130,6 +130,14 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
return false;
|
||||
}
|
||||
|
||||
if (in_array($attribute, [
|
||||
self::SEE, self::SEE_DETAILS, self::EDIT
|
||||
])) {
|
||||
if ($subject->getUser() === $token->getUser()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (self::TOGGLE_CONFIDENTIAL === $attribute) {
|
||||
if (null !== $subject->getUser() && ($subject->getUser() === $token->getUser())) {
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user