getUser(); if (!$user instanceof UserProject) { throw new UnhautorizedMaestroException('User not logged in !', 'user', 'voteOnAttribute'); } $jws = SimpleJWS::load($subject); $payload = $jws->getPayload(); if (!isset($payload['acl'])) { throw new UnprocessableEntityMaestroException('ACL not found !', 'acl', 'voteOnAttribute'); } $acl = $payload['acl']; if (!isset($acl[$attribute]) || 1 !== (int) $acl[$attribute]) { throw new ForbiddenMaestroException('project', 'acl', 'voteOnAttribute'); } return true; } }