Re: [xwiki-users] API/Scripting : create user and attach some files to its profile
Hello, I added some others attributes (I don't know if you can do the same with file) Add some attributes here: /bin/edit/XWiki/XWikiUsers?editor=class e.g. myaddress (disabled it to prevent your user modified it) Add this field "myaddress" on the sheet: /bin/view/XWiki/AdminUserProfileSheet and finally add it in xwiki.cfg: #-# retrieve the following fields from LDAP and store them in the XWiki user object (xwiki-attribute=ldap-attribute) xwiki.authentication.ldap.fields_mapping=last_name=sn,first_name=givenName,email=xcut,myaddress=street and choose a value for this setting: #-# On every login update the mapped attributes from LDAP to XWiki otherwise this happens only once when the XWiki #-# account is created. #-# - 0: only when creating user #-# - 1: at each authentication #-# The default is 0 xwiki.authentication.ldap.update_user=1 (eventually add a XWiki.TranslationDocumentClass to translate myaddress attribute) Pascal BASTIEN En date de : Ven 25.11.16, m...@ow2.org a écrit : Objet: [xwiki-users] API/Scripting : create user and attach some files to its profile À: "XWiki Users" Date: Vendredi 25 novembre 2016, 12h37 Hi, I'm working on a registration system around xwiki. The basic workflow is the user is created in a LDAP directory at registration time. Then the user can login to xwiki. It's only upon the first successful login to xwiki that the user's xwiki profile is created in xwiki database. Now here is my point : how could I prepare the user profile *before* he gets connected ? For example I would be able to attach some files to XWiki. and why not some others attributes. Is anyone already achieved this ? Cheers ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Restfull URL to page in subwiki
On 11/27/2016 07:40 AM, Volker Lapczynski wrote: > > I use Autohotkey to get text from a page with this url: > > UrlDownloadToFile, http:// > Server:8080/xwiki/rest/wikis/wiki/subwiki/Main/pages/MyPage?outputSyntax=plain&xpage=plain > C:\temp\MyText.txt > > > How do i do this with curl from a *SUBWIKI*? > > curl -u Admin:admin > "Server:8080/xwiki/rest/wikis/wiki/*subwiki*/Main/pages/MyPage?outputSyntax=plain&xpage=plain" > is not working > Should be: http://Server:8080/xwiki/rest/wikis/subwiki/spaces/Main/pages/MyPage -- Sergiu Dumitriu http://purl.org/net/sergiu/ ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Restfull URL to page in subwiki
Hi, > On 27 Nov 2016, at 13:40, Volker Lapczynski wrote: > > > I use Autohotkey to get text from a page with this url: > > UrlDownloadToFile, http:// > Server:8080/xwiki/rest/wikis/wiki/subwiki/Main/pages/MyPage?outputSyntax=plain&xpage=plain > C:\temp\MyText.txt > > > How do i do this with curl from a *SUBWIKI*? > > curl -u Admin:admin > "Server:8080/xwiki/rest/wikis/wiki/*subwiki*/Main/pages/MyPage?outputSyntax=plain&xpage=plain" > is not working See http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI#HPageresources for the REST format For example: http://www.xwiki.org/xwiki/rest/wikis/platform/spaces/Main/pages/WebHome This will return the XML or JSON for the page. If what you want is the content as plain text you can simply use the /view/ action (instead of the REST API) as in: http://platform.xwiki.org/xwiki/bin/view/Main/WebHome?outputSyntax=plain&xpage=plain See http://platform.xwiki.org/xwiki/bin/view/DevGuide/Standard+URL+Format#HAction:view for more details. Thanks -Vincent > Thanks Volker ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Restfull URL to page in subwiki
I use Autohotkey to get text from a page with this url: UrlDownloadToFile, http:// Server:8080/xwiki/rest/wikis/wiki/subwiki/Main/pages/MyPage?outputSyntax=plain&xpage=plain C:\temp\MyText.txt How do i do this with curl from a *SUBWIKI*? curl -u Admin:admin "Server:8080/xwiki/rest/wikis/wiki/*subwiki*/Main/pages/MyPage?outputSyntax=plain&xpage=plain" is not working Thanks Volker ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users