Skip to content

Commit

Permalink
Merge pull request #5820 from dhaura/DP-add-branding-restrictToPublis…
Browse files Browse the repository at this point in the history
…hed-param

Add `restrictToPublished` Param when Branding Resolver is Called
  • Loading branch information
dhaura committed Aug 12, 2024
2 parents e255d4f + 1f6c668 commit b112f41
Showing 1 changed file with 5 additions and 1 deletion.
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);
uri = uriBuilder.build().toString();

if (log.isDebugEnabled()) {
Expand Down

0 comments on commit b112f41

Please sign in to comment.