torsdag 16. januar 2014

NotesItem.IsProtected: How has this wonderful feature passed me by for so many years?

Last week I needed to do some batch processing on the person documents in Domino Directory. So, as any other decent person would do, I created an agent.

When testing the compared fields modified by my agent with similar fields in a document not modified, and noticed that an item property "PROTECTED" was not set...




After a little investigation I found this wonderful security feature. The "Must have at least Editor access to use" field property prohibits a user with Author access to the document to edit the field. The property is available to all kind of fields.




I instantly thought of several applications I have made in the past that could have needed exactly this functionality. Because of me being not aware of this I chose different, and more time demanding techniques, to achieve this.

The item property is available using Lotusscript, Java or Javascript as well, so there you have 3 more reasons why I should have seen it but didn't...

I have not (yet) tried to explore how XPages cope with this, but since Java and Javascript supports querying and setting this property it's supported for sure. If any of you reading this knows more about this feel free to comment.



Last: To my defense I asked two of my dry capable colleagues if they knew about this feature. Lucky for me they didn't so I feel I'm not a complete jerk. And that fact makes it even more important to bring this information to the masses... :-)


Ingen kommentarer:

Legg inn en kommentar