Skip to content
Snippets Groups Projects
Verified Commit 9d386d1e authored by ynerant's avatar ynerant
Browse files

Unauthenticated users can't display activity entry view


Signed-off-by: ynerant's avatarYohann D'ANELLO <ynerant@crans.org>
parent 0bd447b6
No related branches found
No related tags found
1 merge request!191Changements variés et mineurs
......@@ -168,6 +168,9 @@ class ActivityEntryView(LoginRequiredMixin, TemplateView):
Don't display the entry interface if the user has no right to see it (no right to add an entry for itself),
it is closed or doesn't manage entries.
"""
if not self.request.user.is_authenticated:
return self.handle_no_permission()
activity = Activity.objects.get(pk=self.kwargs["pk"])
sample_entry = Entry(activity=activity, note=self.request.user.note)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment