def update(self): cm = ICommentsManager(self.context) self.comments = cm.getComments() self.attachable = cm.attachable() self.count = len(self.comments) mtool = getToolByName(self.context, 'portal_membership') username = mtool.getAuthenticatedMember().getUserName() mi = mtool.getMemberInfo(username) self.myname = mi and mi['fullname'] or username self.canPost = mtool.checkPermission('Reply to item', self.context)
def update(self): cm = ICommentsManager(self.context) self.comments = cm.getComments() self.attachable = cm.attachable() self.count = len(self.comments) mtool = getToolByName(self.context, "portal_membership") username = mtool.getAuthenticatedMember().getUserName() mi = mtool.getMemberInfo(username) self.myname = mi and mi["fullname"] or username self.canPost = mtool.checkPermission("Reply to item", self.context)
def attachable(self): cm = ICommentsManager(self.context) return cm.attachable()
def attachable(self): cm = ICommentsManager(self.context) return cm.attachable()