Skip to content
Snippets Groups Projects
Commit 89e7b2bd authored by Jonathan Foucher's avatar Jonathan Foucher
Browse files
parent d5d697bc
No related branches found
No related tags found
No related merge requests found
Pipeline #85331 passed
......@@ -488,15 +488,7 @@ class MesurementController extends CRUDController
private function generateActionCell(Model\Mesurement $mesurement, bool $isActionPlan = false)
{
$user = $this->userProvider->getAuthenticatedUser();
if (
(
$this->authorizationChecker->isGranted('ROLE_USER')
&& $mesurement->getCollectivity()->getIsServicesEnabled()
&& ($user->getServices()->isEmpty() || $mesurement->isInUserServices($user))
)
|| $this->authorizationChecker->isGranted('ROLE_ADMIN')
|| !$mesurement->getCollectivity()->getIsServicesEnabled()
) {
if ($user->hasAccessTo($mesurement)) {
if ($isActionPlan) {
return '<a href="' .
$this->router->generate('registry_mesurement_edit', ['id' => $mesurement->getId()]) . '">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment