Skip to content
Open
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
7 changes: 2 additions & 5 deletions src/controllers/apiContentController.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const loadAPIContent = async (req, res) => {

let apiDetail = null;
//check whether user has access to the API via control plane
if (config.controlPlane?.enabled !== false && !isFederatedAPI) {
if (config.controlPlane?.enabled !== false) {
try {
let apiName = metaData ? metaData.apiHandle?.split('-v')[0] : "";
const version = metaData ? metaData.apiInfo.apiVersion : "";
Expand Down Expand Up @@ -563,11 +563,8 @@ const loadDocument = async (req, res) => {
templateContent.isGraphQLTryout = tryoutEnabled;
}
let apiMetadata = definitionResponse.metaData;

const gatewayVendor = apiMetadata?.apiInfo?.gatewayVendor || 'wso2';
const isFederatedAPI = constants.FEDERATED_GATEWAY_VENDORS.includes(gatewayVendor);
//check whether user has access to the API via control plane
if (config.controlPlane?.enabled !== false && !isFederatedAPI) {
if (config.controlPlane?.enabled !== false) {
try {
let apiName = apiMetadata ? apiMetadata.apiHandle?.split('-v')[0] : "";
const version = apiMetadata ? apiMetadata.apiInfo.apiVersion : "";
Expand Down