try:
return self._visible_to(context['request'].user)
except KeyError:
- return True
+ try:
+ return self._visible_to(context['viewer'])
+ except KeyError:
+ if self.visibility:
+ return False
+ else:
+ return True
def render(self, context):
return ''
user = get_object_or_404(User, id=id)\r
if private and not (user == request.user or request.user.is_superuser):\r
return HttpResponseUnauthorized(request)\r
+\r
+ if render_to and (not render_to(user)):\r
+ return HttpResponseRedirect(user.get_profile_url())\r
+ \r
context = fn(request, user)\r
\r
rev_page_title = user.username + " - " + tab_description\r