Skip to content

Commit d24f858

Browse files
committed
Mark new /me page as "login required"
That way people automatically redirect to the login page (and back after logging in).
1 parent e4c483c commit d24f858

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pgcommitfest/commitfest/views.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def home(request):
6565
)
6666

6767

68+
@login_required
6869
def me(request):
6970
cfs = list(CommitFest.objects.filter(status=CommitFest.STATUS_INPROGRESS))
7071
if len(cfs) == 0:
@@ -79,10 +80,7 @@ def me(request):
7980
# the user is logged in. XXX: Figure out how to avoid doing that..
8081
form = CommitFestFilterForm(request.GET)
8182

82-
if request.user.is_authenticated:
83-
patch_list = patchlist(request, cf, personalized=True)
84-
else:
85-
patch_list = patchlist(request, cf)
83+
patch_list = patchlist(request, cf, personalized=True)
8684

8785
if patch_list.redirect:
8886
return patch_list.redirect

0 commit comments

Comments
 (0)