add the possibility to add a participation of a person to an event

ref #5
This commit is contained in:
2016-03-24 01:44:32 +01:00
parent 167a147f52
commit 627b9fb08f
13 changed files with 489 additions and 5 deletions

View File

@@ -56,19 +56,31 @@ class LoadRolesACL extends AbstractFixture implements OrderedFixtureInterface
break;
}
printf("Adding CHILL_EVENT_UPDATE & CHILL_EVENT_CREATE to %s "
printf("Adding CHILL_EVENT_UPDATE & CHILL_EVENT_CREATE "
. "CHILL_EVENT_PARTICIPATION_UPDATE & CHILL_EVENT_PARTICIPATION_CREATE "
. "to %s "
. "permission group, scope '%s' \n",
$permissionsGroup->getName(), $scope->getName()['en']);
$roleScopeUpdate = (new RoleScope())
->setRole('CHILL_EVENT_UPDATE')
->setScope($scope);
$roleScopeUpdate2 = (new RoleScope())
->setRole('CHILL_EVENT_PARTICIPATION_UPDATE')
->setScope($scope);
$permissionsGroup->addRoleScope($roleScopeUpdate);
$permissionsGroup->addRoleScope($roleScopeUpdate2);
$roleScopeCreate = (new RoleScope())
->setRole('CHILL_EVENT_CREATE')
->setScope($scope);
$roleScopeCreate2 = (new RoleScope())
->setRole('CHILL_EVENT_PARTICIPATION_CREATE')
->setScope($scope);
$permissionsGroup->addRoleScope($roleScopeCreate);
$permissionsGroup->addRoleScope($roleScopeCreate2);
$manager->persist($roleScopeUpdate);
$manager->persist($roleScopeUpdate2);
$manager->persist($roleScopeCreate);
$manager->persist($roleScopeCreate2);
}
}