@@ 83-93 (lines=11) @@ | ||
80 | $this->setJsonErrorHandler(); |
|
81 | $includePrivate = $this->app['security']->isGranted(self::MANAGER_REQUIRED_ROLE); |
|
82 | $next = $this->dataSource->fetchUpcomingTickets($includePrivate); |
|
83 | if ($includePrivate) { |
|
84 | $show = $next; |
|
85 | } else { |
|
86 | $show = []; |
|
87 | foreach ($next as $k => $ticket) { |
|
88 | $show[$k] = $ticket; |
|
89 | if ($ticket['blocking']) { |
|
90 | break; |
|
91 | } |
|
92 | } |
|
93 | } |
|
94 | ||
95 | return new JsonResponse($show); |
|
96 | } |
@@ 37-47 (lines=11) @@ | ||
34 | // $includePrivate = $this->app['security']->isGranted(self::MANAGER_REQUIRED_ROLE); |
|
35 | $includePrivate = false; |
|
36 | $next = $this->getDataStore()->fetchUpcomingTickets($includePrivate); |
|
37 | if ($includePrivate) { |
|
38 | $show = $next; |
|
39 | } else { |
|
40 | $show = []; |
|
41 | foreach ($next as $k => $ticket) { |
|
42 | $show[$k] = $ticket; |
|
43 | if ($ticket['blocking']) { |
|
44 | break; |
|
45 | } |
|
46 | } |
|
47 | } |
|
48 | ||
49 | return new JsonResponse($show); |
|
50 | } |