code: def user_can_update_attachments(self):
          
          context = self.context
          pm = api.get_tool("portal_membership")
          return pm.checkPermission(EditResults, context) or \
              pm.checkPermission(EditFieldResults, context)
docs: Checks if the current logged in user is allowed to update attachments