Anyone try anything like this before? (SBM 2009 R2)
The first part you'd have to tackle is getting all the Roles that the user is associated with and determining if any of those Roles are appicable to this workflow. I believe that the TS_SECURITYCONTROLS table is where you might start looking.
Also you might try simple MashupScript using the $SCRIPT() tag to see if you can control the form in the way you want.
Accepted AnswerModeratorChad M HulseOffline
Accepted AnswerClyde VaseyOffline0I use roles in a number of workflows in Mashups. We utilize this to show/hide transitiions. I am not aware of a means to use ROLES to control specific fields. With Mashups2009, you have the power of java scripting that will enable you to show and hide fields in a transition. Using that scripting power you can manage who updates what fields based on a single selection field value. Hope this helps.
Accepted Answer0As far as I can tell, 2009R2 is still limited to the pre-defined sections. The dbSchema says that the constant TS_TBLID_SECTIONS in TS_TABLES is "not currently used". I'm already using Advanced and Manager sections for other role-based privilege. I still have 11 roles each of which is allowed access to their own data. Can I create extra Privilege Sections?
Another option I'm considering would be to use sub-task / child tickets to control access.
This is a more "interesting" problem that I first guessed. My current solution isn't working yet, but I feel that it's close.
Whew! What a merry-go-round. I'll post status as I continue.
Also it's probably not a big deal if you are just passing the Auto=yes/no but if you start trying to pass real valid XML out of the MashupScript, you may run into problems if you're doing ext.writeStreams in the script because everything comes out with text/html as the header. In that case, the function below might prove useful to you, it's what I use to send real XML out of MashupScript, with correct headers:
Response = "HTTP/1.1 200 OK" & vbcrlf
Response = Response & "Date: " & now & vbcrlf
Response = Response & "Server: Microsoft-IIS/6.0" & vbcrlf
Response = Response & "Expires: 0" & vbcrlf
Response = Response & "Connection: close" & vbcrlf
Response = Response & "Content-Type: text/xml; charset=UTF-8" & vbcrlf
XML = "" & vbcrlf & XML
shell.redirectHTTP = Response & vbcrlf & XML