Skip to content

Commit

Permalink
Fix shared application view issue
Browse files Browse the repository at this point in the history
  • Loading branch information
chamilaadhi committed Sep 12, 2024
1 parent 66ba661 commit 1fa232f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ public Response applicationsApplicationIdGet(String applicationId, String ifNone
String username = RestApiCommonUtil.getLoggedInUsername();
try {
String organization = RestApiUtil.getValidatedOrganization(messageContext);
OrganizationInfo orgInfo = RestApiUtil.getOrganizationInfo(messageContext);
APIConsumer apiConsumer = APIManagerFactory.getInstance().getAPIConsumer(username);
Application application = apiConsumer.getApplicationByUUID(applicationId, organization);
if (application != null) {
Expand All @@ -431,7 +432,8 @@ public Response applicationsApplicationIdGet(String applicationId, String ifNone
}
}
application.setApplicationAttributes(applicationAttributes);
if (RestAPIStoreUtils.isUserAccessAllowedForApplication(application)) {
if (RestAPIStoreUtils.isUserAccessAllowedForApplication(application) || (orgInfo.getName() != null
&& orgInfo.getName().equals(application.getSharedOrganization()))) {
ApplicationDTO applicationDTO = ApplicationMappingUtil.fromApplicationtoDTO(application);
applicationDTO.setHashEnabled(OAuthServerConfiguration.getInstance().isClientSecretHashEnabled());
Set<Scope> scopes = apiConsumer
Expand Down

0 comments on commit 1fa232f

Please sign in to comment.