Questions on Workflow / Restricting user's right

MatthieuR
New Contributor III

Hello All,

I have 2 questions regarding interaction between workflow standard functionality and user's rights.

When we use form templates, by default users can complete/revert form or the complete/revert Forms workflow. My client would like to adapt this behaviour so that user can complete their form/workflow but revert can only be done by admins, hence those buttons should remain greyed out/inactive for end user : is it possible ?

MatthieuR_0-1666038159026.png

 

Also, when we complete a form or even lock centrally a whole workflow, that prevent any data input but still allow users to run calculations through buttons (which trigger data management jobs) that are present in the dashboard. Can we lock somehow the fact for end users to be able to run, or not, those calculations?

Thanks for your help

Matthieu

2 REPLIES 2

LeeB
Contributor II

Think you'll need set up the FormsEventHandler Extensbility Rule to prevent users from reverting a form if they are not an Administrator.

Try this:

 

 

 

Select Case args.OperationName
				
					Case Is = BREventOperationType.Forms.RevertForm
			
						If (BRApi.Security.Authorization.IsUserInGroup(si, "Administrators")) Then
						
							'Do nothing
						Else 
							
							If (args.IsBeforeEvent = False) Then
								
								Throw (New XFUserMsgException(si, Nothing, Nothing, "Only Administrators can Revert Form"))
							End If
						End If
						
				End Select

 

 

 

JackLacava
Community Manager
Community Manager

Calculations triggered by DataManagement jobs are likely using Custom Calculation functions, so in those functions you could check the status of the workflow before you perform the action. You might have to pass the workflow coordinates (profile, scenario, period) to the functions as parameters.

Also consider that there is a Manage Data Group property on the Scenario, and anyone not in that group won't be able to run DM jobs targeting that Scenario. Obviously it's not a solution if users do need to run those calculations at some point, but it's an option if the functionality can be removed from them altogether.