def user_can_edit_snippet_type(user, model):
    for action in ('add', 'change', 'delete'):
        if user.has_perm(get_permission_name(action, model)):
            return True

    return False
true if user has 'add', 'change' or 'delete' permission on this model
dataset/ETHPy150Open torchbox/wagtail/wagtail/wagtailsnippets/permissions.py/user_can_edit_snippet_type