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