Adding the user to all supported organization instead of only to the
organization the item is going to be published.
This commit is contained in:
parent
c7890e2121
commit
ae173ccbd4
|
@ -175,6 +175,11 @@ public class CKANPackage extends CKAN {
|
|||
|
||||
}
|
||||
|
||||
CKANUser ckanUser = CKANUserCache.getCurrrentCKANUser();
|
||||
for(String supportedOrganization : supportedOrganizations) {
|
||||
ckanUser.addUserToOrganization(supportedOrganization);
|
||||
}
|
||||
|
||||
logger.debug("Supported CKAN Organization for current Context ({}) are {}", getCurrentContext(),
|
||||
supportedOrganizations);
|
||||
return supportedOrganizations;
|
||||
|
@ -286,8 +291,7 @@ public class CKANPackage extends CKAN {
|
|||
objectNode.put(AUTHOR_KEY, ckanUser.getName());
|
||||
objectNode.put(AUTHOR_EMAIL_KEY, ckanUser.getPortalUser().getEMail());
|
||||
|
||||
CKANOrganization ckanOrganization = getPublishingOrganization(objectNode);
|
||||
ckanUser.addUserToOrganization(ckanOrganization.getName());
|
||||
getPublishingOrganization(objectNode);
|
||||
|
||||
return objectNode;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue