When assigning a role to a user in a group, if he is Admin of the org he will be also an admin of the group, otherwise he will be a member
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@133217 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
75046a3920
commit
f2c69764d0
|
@ -55,6 +55,9 @@ public class AssociationToGroupThread extends Thread {
|
|||
// retrieve the role to be assigned according the one the user has into the organization of the dataset
|
||||
RolesCkanGroupOrOrg role = RolesCkanGroupOrOrg.valueOf(catalogue.getRoleOfUserInOrganization(username, organization, catalogue.getApiKeyFromUsername(username)).toUpperCase());
|
||||
|
||||
if(!role.equals(RolesCkanGroupOrOrg.ADMIN))
|
||||
role = RolesCkanGroupOrOrg.MEMBER; // decrease the role to member if it is not an admin
|
||||
|
||||
boolean assigned = catalogue.checkRoleIntoGroup(username, groupTitle, role);
|
||||
|
||||
if(assigned){
|
||||
|
|
Loading…
Reference in New Issue