def is_item_visible(self, permission: str, item: str) -> bool:
        """
        Check if an item is visible on the template
        this changed with permission mapping feature.
        This is a best effort to deliver the feature
        and not break compatibility

        permission is:
         - 'can_' + <METHOD_NAME>: On normal routes
         - <METHOD_NAME>: when it's an action

        """
        _view = self.find_views_by_name(item)
        item = _view.class_permission_name

        if PERMISSION_PREFIX in permission:
            method = permission.split(PERMISSION_PREFIX)[1]
        else:
            if hasattr(_view, "actions") and _view.actions.get(permission):
                permission_name = _view.get_action_permission_name(permission)
                if permission_name not in _view.base_permissions:
                    return False
                return self.security_manager.has_access(permission_name, item)
            else:
                method = permission
        permission_name = PERMISSION_PREFIX + _view.get_method_permission(method)
        if permission_name not in _view.base_permissions:
            return False
        return self.security_manager.has_access(permission_name, item)

        Check if an item is visible on the template
        this changed with permission mapping feature.
        This is a best effort to deliver the feature
        and not break compatibility

        permission is:
         - 'can_' + <METHOD_NAME>: On normal routes
         - <METHOD_NAME>: when it's an action

        
flask_appbuilder/filters.py