Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add restrictToPublished Param when Branding Resolver is Called #5820

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, WSO2 LLC. (http://www.wso2.com).
* Copyright (c) 2021-2024, WSO2 LLC. (http://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
Expand Down Expand Up @@ -55,6 +55,8 @@ public class BrandingPreferenceRetrievalClient {
private static final String RESOURCE_NAME_URL_SEARCH_PARAM = "name";
private static final String RESOURCE_LOCALE_URL_SEARCH_PARAM = "locale";
private static final String RESOURCE_SCREEN_URL_SEARCH_PARAM = "screen";
private static final String RESTRICT_TO_PUBLISHED_URL_SEARCH_PARAM = "restrictToPublished";
private static final String TRUE = "true";

/**
* Check for branding preference in the given tenant.
Expand Down Expand Up @@ -87,6 +89,8 @@ public JSONObject getPreference(String tenant, String type, String name, String
if (StringUtils.isNotBlank(locale)) {
uriBuilder.addParameter(RESOURCE_LOCALE_URL_SEARCH_PARAM, locale);
}

uriBuilder.addParameter(RESTRICT_TO_PUBLISHED_URL_SEARCH_PARAM, TRUE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also don't we need to consider this param for getCustomTextPreference method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix for text customizations is tracked by wso2/product-is#20858

uri = uriBuilder.build().toString();

if (log.isDebugEnabled()) {
Expand Down
Loading