Jahia in English > User-Group mapping

0 (0 Good)
0 (0 Bad)

User-Group mapping

by  namitgupta »  2012/10/30 13:05

Hello All,

I have a requirement wherein we need to do a bulk upload for creating users in the JCR along with group assigment. We have been able to create the users using the bulk upload functionality available OOB in Jahia. However, we could not map the users to the groups. I just wanted an opinion on the possible approach to achieve this functionality programmatically.

Please let me know your thoughts on this.

 

Regards,

Namit

  (namitgupta)

Number of messages  36
Registration date
0 (0 Good)
0 (0 Bad)

Re: User-Group mapping

by  shyrkov »  2014/01/02 09:41

Hello Namit,

 

programmatically the users can be added to groups using:

org.jahia.services.usermanager.JahiaGroup.addMember(Principal)

or

org.jahia.services.usermanager.JahiaGroup.addMembers(Collection<Principal>)

for adding multiple users at once.

 

For lookup of groups and users the following services:

org.jahia.services.usermanager.JahiaGroupManagerService

org.jahia.services.usermanager.JahiaUserManagerService

can be used.

 

Kind regards

Sergiy

  • Re: User-Group mapping
    2014/01/02 09:41

    shyrkov <p> Hello Namit,</p> <p> &nbsp;</p> <p> programmatically the users can be added to groups using:</p> <p> org.jahia.services.usermanager.JahiaGroup.addMember(Principal)</p> <p> or</p> <p> org.jahia.services.usermanager.JahiaGroup.addMembers(Collection&lt;Principal&gt;)</p> <p> for adding multiple users at once.</p> <p> &nbsp;</p> <p> For lookup of groups and users the following services:</p> <p> org.jahia.services.usermanager.JahiaGroupManagerService</p> <p> org.jahia.services.usermanager.JahiaUserManagerService</p> <p> can be used.</p> <p> &nbsp;</p> <p> Kind regards</p> <p> Sergiy</p>

  • Number of messages  407
    Registration date Jan 2, 2014
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page