Skip to content

Commit

Permalink
Update discoverability property logic
Browse files Browse the repository at this point in the history
  • Loading branch information
asha15 committed Sep 8, 2024
1 parent b9ff3aa commit 4c67494
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ public boolean doPostGetServiceProvider(ServiceProvider serviceProvider, String
inheritAPIBasedAuthenticationEnabledProperty(mainApplication, serviceProvider);
// Inherit Application enabled property from the main application.
inheritApplicationEnabledProperty(mainApplication, serviceProvider);
// Inherit discoverable property from the main application.
serviceProvider.setDiscoverable(mainApplication.isDiscoverable());
inheritDiscoverabilityProperty(mainApplication, serviceProvider);

/*
If the shared application doesn't have a configured access URL,
Expand All @@ -319,6 +318,11 @@ public boolean doPostGetServiceProvider(ServiceProvider serviceProvider, String
return super.doPostGetServiceProvider(serviceProvider, applicationName, tenantDomain);
}

private void inheritDiscoverabilityProperty(ServiceProvider mainApplication, ServiceProvider sharedApplication) {

sharedApplication.setDiscoverable(mainApplication.isDiscoverable() || sharedApplication.isDiscoverable());
}

private void inheritAPIBasedAuthenticationEnabledProperty(ServiceProvider mainApplication,
ServiceProvider sharedApplication) {

Expand Down

0 comments on commit 4c67494

Please sign in to comment.