public static function canUserModifyOrDelete($idSite, $annotation)
    {
        // user can save if user is admin or if has view access, is not anonymous & is user who wrote note
        $canEdit = Piwik::isUserHasWriteAccess($idSite)
            || (!Piwik::isUserIsAnonymous()
                && Piwik::getCurrentUserLogin() == $annotation['user']);
        return $canEdit;
    }