diff --git a/tildes/tildes/models/user/user.py b/tildes/tildes/models/user/user.py index 58ecdd8..4ea7e20 100644 --- a/tildes/tildes/models/user/user.py +++ b/tildes/tildes/models/user/user.py @@ -142,6 +142,10 @@ class User(DatabaseModel): # - everyone can view all users acl.append((Allow, Everyone, "view")) + # view_history: + # - only allow logged-in users to look through user history + acl.append((Allow, Authenticated, "view_history")) + # message: # - deleted and banned users can't be messaged # - otherwise, logged-in users can message anyone except themselves diff --git a/tildes/tildes/views/user.py b/tildes/tildes/views/user.py index 72042a7..b4f160e 100644 --- a/tildes/tildes/views/user.py +++ b/tildes/tildes/views/user.py @@ -34,6 +34,8 @@ def get_user( """Generate the main user history page.""" user = request.context + # if the viewer doesn't have permission to view history, clear all the variables + # related to pagination (in case they set them manually in query vars) if not request.has_permission("view_history", user): post_type = None after = None