Fixed: do not allow to create activities when no rights to do it

The ACTIVITY_FULL role does not give anymore the roles
CHILL_ACTIVITY_CREATE_PERSON and CHILL_ACTIVITY_CREATE_ACCOMPANYING_COURSE.

Tags: #BC
This commit is contained in:
2022-07-11 19:29:45 +02:00
parent ce17c15d41
commit 6998043159
7 changed files with 458 additions and 570 deletions

View File

@@ -16,7 +16,6 @@ use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable;
use Chill\MainBundle\Entity\HasCenterInterface;
use Chill\MainBundle\Entity\HasCentersInterface;
use Chill\MainBundle\Entity\HasScopesInterface;
use Chill\MainBundle\Entity\Location;
@@ -311,7 +310,9 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
{
if ($this->person instanceof Person) {
return [$this->person->getCenter()];
} elseif ($this->getAccompanyingPeriod() instanceof AccompanyingPeriod) {
}
if ($this->getAccompanyingPeriod() instanceof AccompanyingPeriod) {
return $this->getAccompanyingPeriod()->getCenters();
}