MCPcopy Create free account
hub / github.com/Rello/analytics / indexPublic

Method indexPublic

lib/Controller/PageController.php:190–211  ·  view source on GitHub ↗

* @param $token * @param string $password * @return TemplateResponse|RedirectResponse */

($token)

Source from the content-addressed store, hash-verified

188 * @return TemplateResponse|RedirectResponse
189 */
190 #[PublicPage]
191 #[UseSession]
192 #[NoCSRFRequired]
193 public function indexPublic($token)
194 {
195 $share = $this->ShareService->getReportByToken($token);
196
197 if (empty($share)) {
198 // Dataset not shared or wrong token
199 return $this->redirectToLogin($token);
200 } else {
201 if (!$this->hasShareAccess($token, $share)) {
202 return $this->passwordPrompt($token, false);
203 }
204 $params = array();
205 $params['token'] = $token;
206 $response = new PublicTemplateResponse($this->appName, 'public', $params);
207 $response->setHeaderTitle('Nextcloud Analytics');
208 $response->setFooterVisible(false);
209 return $response;
210 }
211 }
212
213 /**
214 * @param $token

Callers

nothing calls this directly

Calls 4

redirectToLoginMethod · 0.95
hasShareAccessMethod · 0.95
passwordPromptMethod · 0.95
getReportByTokenMethod · 0.45

Tested by

no test coverage detected