def get_permission_for_model(model, action):
    """
    Resolves the named permission for a given model and action.
    """
    if action not in ("view", "add", "change", "delete"):
        raise ValueError(f"Unsupported action: {action}")

    return f"{model._meta.app_label}.{action}_{model._meta.model_name}"