Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
 def attachable(self):
     cm = ICommentsManager(self.context)
     return cm.attachable()
Ejemplo n.º 4
0
 def attachable(self):
     cm = ICommentsManager(self.context)
     return cm.attachable()