# HG changeset patch # User Goffi # Date 1538592404 -7200 # Node ID 122dd136d1ab7ecbe61472a0502206b5dca4d437 # Parent 0cafb79ced6d12348da620ec7e7cb0c382bf2544 pages (blog/view): allow commenting when profile is connected diff -r 0cafb79ced6d -r 122dd136d1ab libervia/pages/blog/view/page_meta.py --- a/libervia/pages/blog/view/page_meta.py Tue Sep 18 21:16:53 2018 +0200 +++ b/libervia/pages/blog/view/page_meta.py Wed Oct 03 20:46:44 2018 +0200 @@ -154,6 +154,9 @@ profile = self.getProfile(request) if profile is None: profile = C.SERVICE_PROFILE + profile_connected = False + else: + profile_connected = True ## pagination/filtering parameters params = self.getAllPostedData(request, multiple=False) @@ -203,7 +206,7 @@ template_data['older_url'] = self.getParamURL(request, after=last_id) ## identities ## - # identities are use to show nice nickname or avatars + # identities are used to show nice nickname or avatars identities = template_data[u'identities'] = self.host.getSessionData(request, session_iface.ISATSession).identities ## Comments ## @@ -265,7 +268,7 @@ tags_http_uri[tag] = self.host.getExtBaseURL(request, tag_url) # if True, page should display a comment box - template_data[u'allow_commenting'] = data.get(u'allow_commenting', False) + template_data[u'allow_commenting'] = data.get(u'allow_commenting', profile_connected) # last but not least, we add a xmpp: link to the node uri_args = {u'path': service.full()}