Added the support for grsf_pre VRE.
This commit is contained in:
parent
c5e8cb8b7e
commit
6b21a61e6c
|
@ -1,2 +1,5 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
|
|
@ -61,13 +61,17 @@ public class GrsfPublisherFisheryService {
|
|||
// Logger
|
||||
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(GrsfPublisherFisheryService.class);
|
||||
|
||||
/*
|
||||
@GET
|
||||
@Path("hello")
|
||||
@Produces(MediaType.TEXT_PLAIN)
|
||||
public Response hello() {
|
||||
return Response.ok("Hello.. Fishery service is here").build();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Already Managed By gCat
|
||||
@GET
|
||||
@Path("get-licenses")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
@ -88,6 +92,7 @@ public class GrsfPublisherFisheryService {
|
|||
.build();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@POST
|
||||
@Path("publish-product")
|
||||
|
@ -120,6 +125,8 @@ public class GrsfPublisherFisheryService {
|
|||
|
||||
String apiKey = catalogue.getApiKeyFromUsername(username);
|
||||
String organization = HelperMethods.retrieveOrgNameFromScope(context);
|
||||
|
||||
|
||||
CommonServiceUtils.hasAdminRole(username, catalogue, apiKey, organization);
|
||||
|
||||
// extend this role to the other organizations in this context
|
||||
|
|
|
@ -697,9 +697,10 @@ public class CommonServiceUtils {
|
|||
* @return
|
||||
*/
|
||||
public static String evaluateOrganization(String organization, Sources sourceInPath) {
|
||||
if(sourceInPath.equals(Sources.GRSF) && organization.equals(Constants.GRSF_ADMIN_ORGANIZATION_NAME))
|
||||
if(sourceInPath.equals(Sources.GRSF) &&
|
||||
(organization.compareTo(Constants.GRSF_ADMIN_ORGANIZATION_NAME)==0 || organization.compareTo(Constants.GRSF_PRE_ORGANIZATION_NAME)==0)){
|
||||
return Constants.GRSF_ADMIN_ORGANIZATION_NAME;
|
||||
else
|
||||
}else
|
||||
return sourceInPath.getOrigName().toLowerCase();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue