added code to add members of some sobigdata vres to the correspondent groups on ckan
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@148342 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
91915711f3
commit
833499fd0c
|
@ -4,6 +4,9 @@
|
|||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="ckan-util-library-2.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan-util-library/ckan-util-library">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="context-root" value="gcube-ckan-datacatalog"/>
|
||||
<property name="java-output-path" value="/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -42,6 +42,11 @@ public class AddUserToOrganizationThread extends Thread {
|
|||
for (Entry<String, String> entry : entrySet) {
|
||||
if(instance.getOrganizationByName(entry.getKey()) != null)
|
||||
instance.checkRoleIntoOrganization(username, entry.getKey(), RolesCkanGroupOrOrg.convertFromCapacity(entry.getValue()));
|
||||
else if(instance.getGroupByName(entry.getKey()) != null){
|
||||
RolesCkanGroupOrOrg roleInGroup = RolesCkanGroupOrOrg.convertFromCapacity(entry.getValue());
|
||||
roleInGroup = roleInGroup.equals(RolesCkanGroupOrOrg.EDITOR) ? RolesCkanGroupOrOrg.MEMBER : roleInGroup;
|
||||
instance.checkRoleIntoGroup(username, entry.getKey(), roleInGroup);
|
||||
}
|
||||
}
|
||||
logger.debug("Thread for role association ended");
|
||||
|
||||
|
|
Loading…
Reference in New Issue