Optix Login Form Widget

Home / FactoryTalk Optix / Security

Description
This video provides a brief look at how to use the User Login form widget in FactoryTalk Optix Studio. And how you can enable various objects and screens based on the assigned roles.

FactoryTalk Optix provides the capability of creating local users and groups and/or using Windows domain accounts. When developing a project, designers can use the Template Libraries to quickly and easily add pre-built login and user management functionality.


Transcript
(00:01) in our previous video we showed how to create users groups and roles and in this video we’re going to show how we can use um those user groups and roles to basically enable a particular you know information we can you know make a a push button Ena based on a login or even a screen uh enabled or visible based on a on a login and um Al we need to go ahead and create a login form to do that so the login form is actually a widget that is in the template Library template library is up here and uh if we type in login we will get underneath widgets
(00:49) this login form I’m going to bring this over into the um project view but before I do that I need to kind of have a place to to store it or or to uh to put it so I’m going to go ahead and just create a folder and I’m going to create a folder under screens and say new folder and we’ll call this folder um we’ll call it uh user security get that um just a you know we can call it whatever we want just basically a place to hold our our um widgets that will be around the user security um so now that we have this folder
(01:32) created we’re going to take this widget from the underneath components and we’re just going to click on it and drag it into this user security folder I can now close my template Library so when I do that I’ll get the login form and if I expand that we see a login form uh type so the one thing I got to do to configure this is if I click on login form type I get the properties window over here on the right right we do need to link our users dynamically link our users under node ID here to the user folder where we have
(02:10) our kind of users uh created or S of our user database so to speak so I’m going to take this folder that’s underneath security going to take the user’s folder and drag it into the um let me do that again uh drag it into the users uh next to the node ID and that’ll make that Dynamic link for us all right so that’s all we got to do to link that now next thing we’re going to do is we’re going to go ahead and create a new screen in here that will be our our login screen so I’m going to go ahead and create uh right click on screens say new
(02:49) screen here’s our screen one that got created I’m just going to call it user login and if I double click on that that’ll open up the screen and to use the login form I you know underneath the widget that I just you know brought in from the library I’m going to take this login form and I’m just going to drag it and put it onto this page or actually um can’t do that let me uh take that back I’m going to go right click on that page and say new and I’m going to go to screen and then I’ll go to user security login form and then choose login form so
(03:37) that’s how we actually would drop that then I could put this form you know anywhere we want doesn’t really show anything it just shows it as a square right now um but we’re going to kind of put that maybe we put it right here all right so other thing we’ll do is we’re going to add this new um screen uh user login I’m going to drag it up here to the navig ation bar to add it to my project navigation okay now that’ll um give us the login when we um when we click that so next I’m going to next thing I’ll do is I will um I’m going to uh
(04:23) kind to add a um just going to add a push button to this overview panel so if I double click on overview view that brings this panel here and then I’m just going to uh right click say new base controls I’m just going to add a button and it doesn’t really matter I’m not going to really link this to anything the point of I want to show here is that maybe I’ll uh rename this to um you know s of like overview or something like that but what I want to show is that if I uh were to make it visible or enabled I can actually choose to uh link this
(05:09) visibility or this enabled to the either the user group or roll that I want to do so we’re going to do visibility I’m going to hit this um Dynamic link icon that pulls up the the window when I go to aliases I’m going to go to session I’m going to go to groups and I’m going to say We’ll assign that this button will only be visible to group two and I will say select the other thing we can do is um if I want to actually make something on my navigation bar um only accessible to a particular group when I come back up
(06:03) here to main window I go to my navigation panel remember our navigation panel um has our overview oven oven one two three and this this new um user login um so I click on navigation panel over here in the right is the properties um underneath on each panel or each tab in the navigation I do have the ability to have an enabled and a visible um you know feature so if I scroll down let’s say maybe we want to make oven Two perhaps um which is right here let’s make oven 2 only enabled when you are uh a group two user
(06:47) so once again I click the dynamic link I uh select aliases session and then we come down and we pick group and we pick group two and then you know the other thing that’s interesting here is that’s enabled so I’m going to go ahead and make um I’m going to go ahead and make this next one which is the um oven three I’m going to go ahead and make it completely invisible unless it’s a particular group is logged in so once again we’ll go to session we’ll go to groups and uh maybe in this case we’ll say it’s only visible to group one
(07:30) and say select right so just by basically linking those groups Andor roles um or users we can control who gets to see what so at this point we’re going to go ahead and start the emulator and we’ll see how this actually works so here’s our uh emulator notice that right now that button that I added to the overview is not visible also notice that oven Two is grayed out and oven three is completely gone invisible at this moment so oven one is accessible and overview is accessible and our user login page is accessible so right now uh we can go
(08:21) ahead and choose um to log in as user one and our password was password one I will hit log in when I do that you notice that oven three immediately became visible I can now click on oven three but notice that oven Two is still grayed out because it’s not um assigned to group one users also if I go back to the overview the button is not visible we go back to the login we will log out this time I will choose user two and I will enter user 2 password and we’ll log in all right so oven Two uh became active or enabled
(09:12) oven three is still invisible or not visible to the group one user so I can click on oven Two and see it and if I go to overview my button uh is now visible right so pretty pretty straightforward pretty simple by um you know creating our users groups and roles and then we can then use those um those properties to to make a particular um you know features either enabled or visible