@@ 58-67 (lines=10) @@ | ||
55 | $this->whitelistService = $whitelistService; |
|
56 | } |
|
57 | ||
58 | public function replaceWhitelistAction(Request $request) |
|
59 | { |
|
60 | $this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']); |
|
61 | ||
62 | $command = new ReplaceWhitelistCommand(); |
|
63 | $command->UUID = (string) Uuid::uuid4(); |
|
64 | $command->institutions = $this->getInstitutionsFromBody($request); |
|
65 | ||
66 | return $this->handleCommand($request, $command); |
|
67 | } |
|
68 | ||
69 | public function addToWhitelistAction(Request $request) |
|
70 | { |
|
@@ 69-78 (lines=10) @@ | ||
66 | return $this->handleCommand($request, $command); |
|
67 | } |
|
68 | ||
69 | public function addToWhitelistAction(Request $request) |
|
70 | { |
|
71 | $this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']); |
|
72 | ||
73 | $command = new AddToWhitelistCommand(); |
|
74 | $command->UUID = (string) Uuid::uuid4(); |
|
75 | $command->institutionsToBeAdded = $this->getInstitutionsFromBody($request); |
|
76 | ||
77 | return $this->handleCommand($request, $command); |
|
78 | } |
|
79 | ||
80 | public function removeFromWhitelistAction(Request $request) |
|
81 | { |
|
@@ 80-89 (lines=10) @@ | ||
77 | return $this->handleCommand($request, $command); |
|
78 | } |
|
79 | ||
80 | public function removeFromWhitelistAction(Request $request) |
|
81 | { |
|
82 | $this->denyAccessUnlessGranted(['ROLE_MANAGEMENT']); |
|
83 | ||
84 | $command = new RemoveFromWhitelistCommand(); |
|
85 | $command->UUID = (string) Uuid::uuid4(); |
|
86 | $command->institutionsToBeRemoved = $this->getInstitutionsFromBody($request); |
|
87 | ||
88 | return $this->handleCommand($request, $command); |
|
89 | } |
|
90 | ||
91 | public function showWhitelistAction() |
|
92 | { |