code: def can_write(self):
          
          sm = getSecurityManager()
          permission = permissions.ModifyPortalContent
  
          if not sm.checkPermission(permission, self.context):
              return False
          return True
docs: Check if the field is writeable