LESSON

Script Action Security

Description

Learn how to restrict the ability of a user to run a Script action using security settings.

Video recorded using: Ignition 8.0

Transcript

(open in window)

[00:00] Script actions on perspective components can have security placed on them to limit which users can run that action. To configure security on a script action, we need to come into the Event Configuration window for that component and find our script action. Down at the bottom of the action, you'll notice there is a Security Settings button. We're gonna go ahead and click on that button to open up the Security Settings window. The security that we can place on the script actions is based on which security levels that a user has. To select a level, simply click the checkbox next to it. You'll notice that I can also select multiple security levels. Down at the bottom of the Security Settings window, you have the ability to select whether users must match all of the security levels selected or any of the security levels selected. Let's take a look at what this might look like in action. I have a simple view here that I've already opened in a perspective session in my web browser. My simple script button simply writes the value that I've written in this text box to the label. If I enter in a new value into my text field and click on my Simple Script button, it writes the value to the label as well. Now if I go back into my designer and I go back into that script action, I can set up security on the action to require that the user is authenticated before they can use that action. Now that I've done that, I'm gonna ahead and click OK and we need to save our changes. Now that I've saved, if I go back into my perspective session and I try to enter in a new value into the text field and click on the Simple Script button, I get an error letting me know that the onClick action is denied because I don't have the correct permissions. To use this script, I'm gonna need to log in, so I'm gonna go ahead and click on the Login button that I have here and log in as one of my users. Now that we've authenticated against the identity provider that we've set up within the project properties, I now can enter in a value into the text field and click on my Simple Script button.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.