[
https://issues.apache.org/jira/browse/AIRAVATA-2385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16041351#comment-16041351
]
ASF GitHub Bot commented on AIRAVATA-2385:
------------------------------------------
Github user machristie commented on a diff in the pull request:
https://github.com/apache/airavata/pull/111#discussion_r120702194
--- Diff:
airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/TenantProfileServiceHandler.java
---
@@ -183,12 +185,25 @@ public boolean deleteGateway(AuthzToken authzToken,
String gatewayId) throws Ten
public boolean isGatewayExist(AuthzToken authzToken, String gatewayId)
throws TenantProfileServiceException, AuthorizationException, TException {
try {
Gateway gateway =
tenantProfileRepository.getGateway(gatewayId);
- return gateway != null;
+ boolean checkStatus =
gateway.getGatewayApprovalStatus().equals(GatewayApprovalStatus.APPROVED);
+ return (gateway != null && checkStatus);
} catch (Exception ex) {
logger.error("Error checking if gateway-profile exists,
reason: " + ex.getMessage(), ex);
TenantProfileServiceException exception = new
TenantProfileServiceException();
exception.setMessage("Error checking if gateway-profile
exists, reason: " + ex.getMessage());
throw exception;
}
}
+
+ private boolean checkDuplicate(Gateway gateway) throws
TenantProfileServiceException {
+ try {
+ Gateway duplicateGateway =
tenantProfileRepository.getGateway(gateway.getGatewayId());
--- End diff --
Same concern here as above. This will work only if getGateway returns an
APPROVED gateway with this gatewayId.
> SciGaP portal need to check for duplicating gateway names and URLs at the
> time of user creating/submitting the gateway request.
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: AIRAVATA-2385
> URL: https://issues.apache.org/jira/browse/AIRAVATA-2385
> Project: Airavata
> Issue Type: Improvement
> Components: PGA PHP Web Gateway
> Affects Versions: 0.17
> Reporter: Eroma
> Assignee: Sneha Tilak
> Fix For: 0.18
>
>
> Currently wt the time of creating or submitting the request this is not
> checked.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)