Can I restrict who can edit an attribute based on the attribute Created By or Owned By?
I have a custom work item named CRM with a custom attribute called "Comment" (note: this is not the system attribute "Comments") which is a Large String. Is it possible to restrict who can edit this attribute based on either the Created By or Owned By attribute?
For instance, if Joe created a new CRM and put info in the Comment attribute, then I want only Joe to be able to edit that attribute. If Mary edits that same CRM work item, since she is not the one who created the CRM then I want to restrict the Comment attribute so she cannot change it.
Is this possible?
One answer
You can create a Java validator, I suppose. See http://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ . I have never tried that with a validator, but you could, based on the example code. I would be interested in the result.
Comments
sam detweiler
Jun 26 '14, 2:41 p.m.there is nothing built in that will do this.. so you would have to write an extension
this would be perfect for the validator type script, IF you could manage user records with it.. but u can't.
so you are stuck having to create a java extension that installs on the server.
note that the RTC model is anyone can change anything in the UI, and its only checked on save. so even tho your extension will prevent save if the user is not the creator/owner, anyone will be able to spend time and time in new text only to have it rejected..