thx Op 30 dec 2009, om 15:06 heeft Arnaud bourree het volgende geschreven:
2009/12/30 Gerritjan Koekkoek <[email protected]>: > Thx, but it looks the code adds the users to all groups, is that correct > understanding. No it add users to group "XWiki.XWikiAllGroup" which is not all groups > > I our case the loop should be constructed on all XWiki.<usernames> documents > (except administrator) > that have a userclass object and are activated; how can i do that? def allGroup = xwiki.getDocument('XWiki.XWikiAllGroup') for(udoc in xwiki.search("select doc from XWikiDocument doc, BaseObject obj where obj.name = doc.fullName and obj.className = 'XWiki.XWikiUsers' and doc.fullName <> 'XWiki.Admin' ")) { gObj = allGroup.newObject('XWiki.XWikiGroups') gObj.set('member',udoc.fullName) } allGroup.save() > > Take a look at > http://code.xwiki.org/xwiki/bin/view/Snippets/Create200DummyUsersSnippet > > Arnaud > >> Hi, >> >> I notice that when you import a XAR file with 'users' these users are not >> automatically added to XWikiAllGroup? >> Is this by design, and if so how do you restore them as members of this >> group (have > 100 users) >> >> Is there a script or macro to add users to a group? >> >> Gerritjan >> _______________________________________________ >> users mailing list >> [email protected] >> http://lists.xwiki.org/mailman/listinfo/users >> > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users > > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users > _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
