diff --git a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Subscriptions/SubscriptionPoliciesManage.jsx b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Subscriptions/SubscriptionPoliciesManage.jsx index 8ffa1f058a0..6d391cc7a4a 100644 --- a/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Subscriptions/SubscriptionPoliciesManage.jsx +++ b/portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Subscriptions/SubscriptionPoliciesManage.jsx @@ -29,6 +29,7 @@ import FormControlLabel from '@material-ui/core/FormControlLabel'; import Paper from '@material-ui/core/Paper'; import API from 'AppData/api'; import { isRestricted } from 'AppData/AuthManager'; +import Configurations from 'Config'; const styles = (theme) => ({ subscriptionPoliciesPaper: { @@ -61,7 +62,15 @@ class SubscriptionPoliciesManage extends Component { componentDidMount() { const { api } = this.props; const isAsyncAPI = (api.type === 'WS' || api.type === 'WEBSUB' || api.type === 'SSE' || api.type === 'ASYNC'); - const policyPromise = isAsyncAPI ? API.asyncAPIPolicies() : API.policies('subscription'); + const limit = Configurations.app.subscriptionPolicyLimit; + let policyPromise; + if (isAsyncAPI) { + policyPromise = API.asyncAPIPolicies(); + } else if (limit) { + policyPromise = API.policies('subscription', limit); + } else { + policyPromise = API.policies('subscription'); + } policyPromise .then((res) => { this.setState({ subscriptionPolicies: res.body.list });