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

  • User-Group mapping
    2012/10/30 13:05

    namitgupta <p> Hello All,</p> <p> 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.</p> <p> Please let me know your thoughts on this.</p> <p> &nbsp;</p> <p> Regards,</p> <p> Namit</p>

  • Number of messages  36
    Registration date Oct 30, 2012
    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

    Sergiy Shyrkov (shyrkov)

    Number of messages  407
    Registration date
    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