New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AIRAVATA-2601] Adding groups to Applications #146
Conversation
Files changed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for submitting this pull request Sneha. See my comments.
try { | ||
ExperimentModel experiment = regClient.getExperiment(airavataExperimentId); | ||
String userId = authzToken.getClaimsMap().get(Constants.USER_NAME); | ||
String entityId = experiment.getExecutionId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The execution id is the application interface id. You need to fetch the application interface and get the application module id from it, and then check to see if the user has access to the application module id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
if (experiment == null) { | ||
logger.error(airavataExperimentId, "Error while launching experiment, experiment {} doesn't exist.", airavataExperimentId); | ||
throw new ExperimentNotFoundException("Requested experiment id " + airavataExperimentId + " does not exist in the system.."); | ||
} | ||
submitExperiment(gatewayId, airavataExperimentId); | ||
registryClientPool.returnResource(regClient); | ||
sharingClientPool.returnResource(sharingClient); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably return the sharingClient to the pool as a broken resource, like what is done for the regClient, see line 1787.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
registryClientPool.returnResource(regClient); | ||
sharingClientPool.returnResource(sharingClient); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about returning the sharingClient in the catch clause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -86,7 +86,7 @@ | |||
*/ | |||
List<ApplicationModule> getApplicationModules(Map<String, String> filters) throws AppCatalogException; | |||
|
|||
List<ApplicationModule> getAllApplicationModules(String gatewayId) throws AppCatalogException; | |||
List<ApplicationModule> getAllApplicationModules(String gatewayId, List<String> accessibleAppIds) throws AppCatalogException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where's the implementation for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -53,7 +53,7 @@ | |||
*/ | |||
List<ApplicationDeploymentDescription> getApplicationDeployements (Map<String, String> filters) throws AppCatalogException; | |||
|
|||
List<ApplicationDeploymentDescription> getAllApplicationDeployements (String gatewayId) throws AppCatalogException; | |||
List<ApplicationDeploymentDescription> getAllApplicationDeployements (String gatewayId, List<String> accessibleIds) throws AppCatalogException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where's the implementation of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
entity.setDomainId(rs.getString("GATEWAY_ID")); | ||
entity.setEntityTypeId(rs.getString("GATEWAY_ID") + ":APPLICATION"); | ||
entity.setOwnerId(rs.getString("USER_NAME") + "@" + rs.getString("GATEWAY_ID")); | ||
entity.setParentEntityId(rs.getString("PROJECT_ID")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just leave parent entity id null since there really isn't a parent of an application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -774,7 +774,8 @@ service RegistryService { | |||
* Returns the list of all Application Module Objects. | |||
* | |||
*/ | |||
list<application_deployment_model.ApplicationModule> getAllAppModules (1: required string gatewayId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the method documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -869,11 +870,15 @@ service RegistryService { | |||
* @param gatewayId | |||
* ID of the gateway which need to list all available application deployment documentation. | |||
* | |||
* @param userName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise please update the method documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Filtering of Application Deployments by gateway ID and user name. We first get a list of Application Deployment IDs that are accessible by the current user and then retrieve the list of Application Deployments. (Similar to how we search for Experiments).
Files changed:
TODO: