def METHOD_NAME(self):
    mt = getToolByName(aq_inner(self.context), "portal_migration")
    if mt.needUpgrading():
        # if the user can't run the upgrade, no sense in displaying the
        # message
        sm = getSecurityManager()
        if sm.checkPermission(ManagePortal, self.context):
            return True
    return False