Make sure to render as public if the user is not logged in
Else we will render the apps, contacts menu etc. Which is undesireable. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
651daa69d9
commit
c59cfeb18a
|
@ -284,6 +284,7 @@ class PageController extends Controller {
|
|||
}
|
||||
|
||||
if ($this->hasUserAccess($form)) {
|
||||
$renderAs = $this->userId !== null ? 'user' : 'public';
|
||||
return new TemplateResponse('forms', 'vote.tmpl', [
|
||||
'form' => $form,
|
||||
'questions' => $this->getQuestions($form->getId()),
|
||||
|
@ -294,7 +295,7 @@ class PageController extends Controller {
|
|||
'userMgr' => $this->userMgr,
|
||||
'urlGenerator' => $this->urlGenerator,
|
||||
'avatarManager' => $this->avatarManager
|
||||
]);
|
||||
], $renderAs);
|
||||
} else {
|
||||
User::checkLoggedIn();
|
||||
return new TemplateResponse('forms', 'no.acc.tmpl', []);
|
||||
|
|
Loading…
Reference in a new issue