Ah that's what I was looking for. Except for the function name (password-extra), it hits the nail on the head.
thanks, Ryan From: stephen.bux...@marklogic.com To: general@developer.marklogic.com Date: Mon, 3 Oct 2011 10:18:46 -0700 Subject: Re: [MarkLogic Dev General] Adding custom properties\attributes to users Geert et al, We added a feature in 4.2 to address this. The security database has an element called sec:password-extra where you can add whatever additional user info you want. You can get and set the additional info using the sec:user-set-password-extra and sec:user-set-password-extra functions (in security.xqy). These functions are mentioned in the documentation on password plugins (http://docs.marklogic.com/4.2doc/docapp.xqy#display.xqy?fname=http://pubs/4.2doc/xml/dev_guide/plugins.xml%2391783 ), and they are described in the API docs (http://docs.marklogic.com/4.2doc/docapp.xqy#display.xqy?fname=http://pubs/4.2doc/apidoc/security.xml&category=Security-sec&function=sec:user-set-password-extra ). The additional info will survive an upgrade – though you should, of course, always do a backup before an upgrade. - Steve B. Stephen Buxton Director, Product Management MarkLogic Corporation stephen.bux...@marklogic.com Phone: +1 650 655 2317 www.marklogic.com This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation. From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Geert Josten Sent: Wednesday, September 28, 2011 10:37 PM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Adding custom properties\attributes to users Hi Harry, To some extend it certainly does. But the best argument against doing so is probably that MarkLogic Server’s security layer doesn’t cater this. You could obviously create a security function yourself, with priv’s and roles and all, but as pointed out, you could lose all your custom properties on user level at next upgrade. Using description field gives the benefit you can still use the Admin interface to create users, which is not possible with 2 and 3. But option 2 is doable as well with a little bit of abstraction. Just create a few functions that take care of user management, and take care of keeping security and your extension xml in synch. Makes sense to put such functionality in a separate module anyhow.. Kind regards,Geert Van: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] Namens Harry B. Verzonden: donderdag 29 september 2011 3:28 Aan: General MarkLogic Developer Discussion Onderwerp: Re: [MarkLogic Dev General] Adding custom properties\attributes to users I am surprised there's no additional input on this issue. Since the user info in the security database is just an xml file, it stands to reason we could safely add properties to them, no? On Sep 27, 2011 1:20 PM, "seme...@hotmail.com" <seme...@hotmail.com> wrote: > > If we want to add custom properties or attributes to a user account in > MarkLogic (beyond username and description), it seems like we have the > following options: > > 1. Put the values in the description field tokenized (Bob | Accounting | > 555-1223 | b...@mail.com) > 2. Use a separate XML file in the content database > 3. Add properties to the XML file for the user in the Security DB > > #1 is good except there is a limit to the number of characters. #2 adds the > overhead of making sure the Securty DB and "extended user info" XML files in > the content DB are always in sync. #3 starts tinkering with the Security DB > which sounds like something to avoid. > > I'm hoping there are other options. What do you all recommend? > > thanks, > Ryan > > _______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general