Hello. Good evening
There are 15 sequence procedures inside one seq file.
Depending on the user, I want to make sure that only some of the selected sequences are capable of performing them, rather than checking all 15 sequences, but I can't find any example files at all.
I'd really appreciate it if you could give me some reference materials or help
Solved! Go to Solution.
You can use TestStand API expressions to evaluate certain criteria, and use that as a precondition to the steps you want to skip.
You must make sure that User Privilege Checking is enabled in your Station Options (Station Options»User Manager»Check User Privileges)
For example, if you wanted TestStand to automatically skip certain steps based on the user's privilege level, you could first obtain flags that indicate the user's permissions:
Locals.Operator = RunState.Engine.CurrentUserHasPrivilege("Operate"),
Locals.Technician = RunState.Engine.CurrentUserHasPrivilege("Debug"),
Locals.Developer = RunState.Engine.CurrentUserHasPrivilege("Develop"),
Locals.Admin = RunState.Engine.CurrentUserHasPrivilege("Configure")
Then, using each of those flags as preconditions in your steps, you can make them run/skip depending on the user's privileges:
Precondition (Run this step if the user is an Operator OR a Technician
Locals.Operator || Locals.Technician
I have attached an example sequence file showing how this works
Here are some other threads that contain similar questions and answers to yours that may help you get exactly the behavior you want: