stock and fishery in the curation area are published private. for publication purpose the role needed is the Catalogue-Admin one
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@133321 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a03399fd53
commit
493b4c27e9
|
@ -137,11 +137,11 @@ public class GrsfPublisherFisheryService {
|
|||
|
||||
// check the user has editor/admin role into the org
|
||||
String organization = HelperMethods.retrieveOrgNameFromScope(contextInWhichPublish);
|
||||
if(catalogue.getRoleOfUserInOrganization(username, organization, catalogue.getApiKeyFromUsername(username)).equals(RolesCkanGroupOrOrg.MEMBER)){
|
||||
if(!catalogue.getRoleOfUserInOrganization(username, organization, catalogue.getApiKeyFromUsername(username)).equals(RolesCkanGroupOrOrg.ADMIN)){
|
||||
|
||||
status = Status.FORBIDDEN;
|
||||
responseBean.setId(null);
|
||||
throw new Exception("You are not authorized to create a product. Please check you have at least the editor role!");
|
||||
throw new Exception("You are not authorized to create a product. Please check you have the Catalogue-admin role!");
|
||||
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ public class GrsfPublisherFisheryService {
|
|||
List<ResourceBean> resources = HelperMethods.getResourcesFromBean(record, username);
|
||||
|
||||
// if confirmed, set to visible TODO anyway if it is confirmed we should another method
|
||||
boolean setPublic = true;
|
||||
boolean setPublic = false;
|
||||
|
||||
// check the license id
|
||||
String license = null;
|
||||
|
|
|
@ -137,11 +137,11 @@ public class GrsfPublisherStockService {
|
|||
|
||||
// check the user has editor/admin role into the org
|
||||
String organization = HelperMethods.retrieveOrgNameFromScope(contextInWhichPublish);
|
||||
if(catalogue.getRoleOfUserInOrganization(username, organization, catalogue.getApiKeyFromUsername(username)).equals(RolesCkanGroupOrOrg.MEMBER)){
|
||||
if(!catalogue.getRoleOfUserInOrganization(username, organization, catalogue.getApiKeyFromUsername(username)).equals(RolesCkanGroupOrOrg.ADMIN)){
|
||||
|
||||
status = Status.FORBIDDEN;
|
||||
responseBean.setId(null);
|
||||
throw new Exception("You are not authorized to create a product. Please check you have at least the editor role!");
|
||||
throw new Exception("You are not authorized to create a product. Please check you have the Catalogue-Administrator role!");
|
||||
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ public class GrsfPublisherStockService {
|
|||
// evaluate the resources
|
||||
List<ResourceBean> resources = HelperMethods.getResourcesFromBean(record, username);
|
||||
|
||||
boolean setPublic = true;
|
||||
boolean setPublic = false;
|
||||
|
||||
// check the license id
|
||||
String license = null;
|
||||
|
|
Loading…
Reference in New Issue