Permalink
Browse files

Excluded inaccessible patterns in profile pages

  • Loading branch information...
1 parent 61c6187 commit c21c5332f8c44ae9b322760bf565d67db87e52f4 @fatiherikli committed May 7, 2013
Showing with 5 additions and 2 deletions.
  1. +5 −2 web/dbpatterns/profiles/views.py
@@ -76,8 +76,11 @@ def get_context_data(self, **kwargs):
can_follow = self.request.user != user
documents = resource.get_collection().find({
- "user_id": user.pk
- })
+ 'user_id': user.pk,
+ '$or': [
+ {'is_public': True},
+ {'user_id': self.request.user.id}
+ ]})
return super(ProfileDetailView, self).get_context_data(
documents=imap(Document, documents),

0 comments on commit c21c533

Please sign in to comment.