Unauthenticated users can't display activity entry view
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
0bd447b608
commit
9d386d1ecf
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue