[xwiki-devs] plugin xwiki
Hi i'm new using a xwiki. I'm trying to make a plugin that allows me to create users on the wiki. but not where to start, I've read the documentation, but I can not connect anything. would appreciate your help. -- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7285335.html Sent from the XWiki- Dev mailing list archive at Nabble.com.
You could check the Create Dummy User snippet for a script that creates users: http://extensions.xwiki.org/xwiki/bin/view/Extension/Create+200+Dummy+Users Ludovic 2012/2/14 modularre-333 <[email protected]>
Hi i'm new using a xwiki.
I'm trying to make a plugin that allows me to create users on the wiki.
but not where to start, I've read the documentation, but I can not connect anything.
would appreciate your help.
-- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7285335.html Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Founder and CEO Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
but this users can't login in the wiki. -- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7287820.html Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi, You might want to explain a bit better what you are trying to do and why you need a plugin. There is the XWiki UI to create users. As for adding a password so that the users can login, you can add the following line uobj.set("password" , user.get(2)) and add a password to the table of users used as input Ludovic 2012/2/15 modularre-333 <[email protected]>
but this users can't login in the wiki.
-- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7287820.html Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Ludovic Dubost Founder and CEO Blog: http://blog.ludovic.org/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost
I have to register users in the wiki automatically, for that I give the plug-in user data to create, and the plugin should be responsible for creating the user on the wiki. If not make myself clear, my English is not good. the process would be so, my application -> send user data (user, pass (to create the new user)) -> wiki plugin (process information) -> user is registered in the wiki. so that after the user has access to the wiki. -- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7288409.html Sent from the XWiki- Dev mailing list archive at Nabble.com.
any help? -- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7291188.html Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi, If you want to have an XWiki application (UI) where an admin can fill in a form with user name and password for multiple users, then press a button and that users get created, you don`t need a plugin or component. You can do that in velocity in an XWiki page by using the web API [1]. Make sure you read the Development Guide [2] to understand the XWiki Architecture and Data Model, then you can start with some Velocity scripting by checking out some of the tutorials. After reading that, you should be able to determine if you need a Java component to do some heavy processing or you can just do a quick velocity script in a page as I`ve mentioned. Hope this helps, Eduard [1] http://platform.xwiki.org/xwiki/bin/view/DevGuide/API [2] http://platform.xwiki.org/xwiki/bin/view/DevGuide/WebHome 2012/2/16 modularre-333 <[email protected]>
any help?
-- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7291188.html Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
I do not I have to login in the wiki and register the user, my application should do it for me, If I have 200 people already created and I want to add to the wiki, I should not review person by person who is in the wiki or not, my plugin would take care to create these users in the wiki. I hope to be more clear. -- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7291816.html Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi, So you just want to automate the creation of 200 users. How do you have those users stored? In a text file, comma separated? If so, then you can attach the file to an XWiki page. After that, you need to write a script (either velocity, or groovy) as admin in which you programatically get the attached file's contents and you add each user described in that file. To add an user, you need to create a page and add to it an object of class XWiki.XWikiUsers. You set the user name, password and other fields in that object and then you save the page. Alternatively, I think you could use XWiki's REST API [1] and the linux curl command to do it from a command line instead of using scripting in XWiki. Whichever you like best, I wish you happy coding. -Eduard [1] http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI On Thu, Feb 16, 2012 at 8:06 PM, modularre-333 <[email protected]>wrote:
I do not I have to login in the wiki and register the user,
my application should do it for me,
If I have 200 people already created and I want to add to the wiki,
I should not review person by person who is in the wiki or not,
my plugin would take care to create these users in the wiki.
I hope to be more clear.
-- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7291816.html Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
thanks for your answer. I'm using the XML-RPC API, but I have a problem when I create a user The creation of the user is done perfectly, but when I login with that newly created user, I can't edit the profile. I saw that in "XWiki.XWikiGlobalRights" may declare privileges, but can not find how to do it from the API. -- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7294602.html Sent from the XWiki- Dev mailing list archive at Nabble.com.
Hi, So you do not want to create an XWiki plugin, but instead you want to access an XWiki instance from your outside (Java?) application, using XMLRPC, and create the users. Well, if you look at an XWiki user profile's page using the objects editor, you see that you have there an XWiki.XWikiUsers object defining the user and an XWiki.XWikiRights object setting the same user as editor of the profile page. All you have to do now, since you`ve already created the user object, is to add another object (of class "XWiki.XWikiRights"), set the right "levels" to "edit" and the "users" to the id of the user you`ve just created (same ID as his profile page ex: "XWiki.MyUser"). Hope this helps, Eduard P.S.: As a suggestion for any future questions that you might want to post to the XWiki mailing list, please take the time to properly formulate your question by properly specifying/detailing the task you want to perform and the methods you want to use to perform it. This way we limit the number of exchanged mails and the time wasted by well intentioned people on trying to understand what you are actually asking. Thanks. On Fri, Feb 17, 2012 at 5:29 PM, modularre-333 <[email protected]>wrote:
thanks for your answer.
I'm using the XML-RPC API, but I have a problem when I create a user
The creation of the user is done perfectly, but when I login with that newly created user, I can't edit the profile.
I saw that in "XWiki.XWikiGlobalRights" may declare privileges, but can not find how to do it from the API.
-- View this message in context: http://xwiki.475771.n2.nabble.com/plugin-xwiki-tp7285335p7294602.html Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (3)
-
Eduard Moraru -
Ludovic Dubost -
modularre-333