Digitize Asset Management - Setting User Privileges (Part 3) | Caspio

Digitize Asset Management

Video Synopsis

 

Speaker

  • Ned Pajic, Technical Evangelist, Caspio

 


Transcript

Ned Pajic: Hi, welcome to this ultimate video guide on how to build an IT resource management application with Caspio secure, an easy-to-use online database platform. My name is Ned, and in part three of this video guide, I will show you how to use the views to filter users based on their user roles. And how to create login screens to give access based on different permissions. Let’s take a look. Once you have all of your tables created, next step is to go down to the views object, and we’re going to be using views to filter information from our user table. This is how in Caspio we’re going to assign different permissions to different employees. And in this specific application, we’re going to have four different views to filter data. One to filter out active admins, one to filter out active admins and managers, active managers only. And then we’re going to have one view to filter out all active employees.

View Given Access to Everyone

Sometimes when you’re building forms and reports, they may need to be shared amongst different user roles. Let me build the views and show you what I mean by that. So the first view we’re going to create is the one that gives access to everyone. And all I’m going to do is give this view a name. I’m going to call this RM for resource management, all access, and we want to filter information from the employee table. So let’s move that to the right, hit next. And then, using the criteria tab by dragging and dropping these elements inside a canvas screen. You’re going to be able to configure and define your logic in terms of the criteria that you want to use to filter data. You can click on the reset link to start over. This is the original anchor, you can never move this one always has to be in place.

 

Configure Sheet to Filter All Active Employees

So now, how do I configure this to filter out everyone who’s active from my employee table? So move over to field element, use the field account status and have that be checked. If this condition is true, now when I hit finish, the view is going to filter out everyone from my table who’s flagged as active. And in this case, that’s everyone. Let’s go back out to the views menu. Now let’s build a view that filters out only active admins. So click on new view. Let’s give it a name, RM active admins. Once again, we want the employee table, so let’s move that to the right. Click next. And then, using the criteria tab, let’s move over two field elements and snap them in place. And the first field I’m going to select is access level. And I want that to equal to value of admin, but because we’re looking for active admins, we want this additional field element to be selected as account status.

 

And we want that to be checked. If both of these conditions are true, now, when we hit finish, we should be able to see a limited view that filters out only the active admins from my table. And we only have two. So now you can see how by using the views, we filter different users based on their user role and also the account status field. Let’s go back out to the view menu again, and now let’s filter out the active admins and managers. So this one is going to have a slightly different configuration, RM, active admin, and abbreviation for managers. Once again, from the employee table, click next, and then, using the criteria tab drag over the or element. Use the two field elements inside the, or, and one more field element outside of, or, and now what you do is configure the access level to equal to the value of admin. Or, we want the access level to equal to manager. But since we’re looking for active admins and managers, we want this last field element or account status to be checked.

 

Manager Only View

So let’s click finish. And now, when you open this third view, you’ll be able to see all of your managers or all of your admins who are active. And the final view that we’re going to create is just manager only. So let’s set up our fourth view, RM, active manager from the same employee table, hit next, criteria tab. And let’s move over two field elements once again. And this time, we want the access level to equal to manager, and we want the account status to be checked, finish. And the final view is going to look at all the managers that are active. Let’s go back out to the views menu. I just want to explain; imagine you have forms and reports that all of your user levels need to access. This is the reason why we have all access view that gives access to everyone because you might have a form to allow the end users to update their password.

 

Everyone should have this ability. This is the reason why we create the view because we want everyone from that table to be able to update their password. But if you have a report that only an admin user needs to see, this is the reason why we have only the active admin view because only these users will be able to access that specific report. I also have a view that filters out active admins and managers. This is going to eventually save you on resources and data pages as you’re building your forms and reports. Because imagine you have a report that both the admin and manager needs to be able to see. This is why you combine this view together so they can both access and be able to see that report. But if you didn’t have this view, now I would have to build that report for both the admins and managers. That’s equivalent to two data pages versus one.

 

Building Login Interfaces

So this is the reason behind this one view. That’s going to give access to both. And finally, if you have some reports and forms that only the manager needs to be able to see, this is the behind this view. Depending on your organizational structure, you might have additional views. You might have less views, but you have to identify who’s going to be accessing what data in order to properly configure the views and filter out your user roles correctly. The next step is to go down to the authentications object and to build all of our login interfaces. And we’re going to create a total of four. So let’s begin with the first one by clicking on this link here at the top for my data source. I’m going to begin with the view that’s given access to everyone. You don’t have to start with this view, but I always like to begin with the one that gives access to all reports and forums. For your setup options,

 

you have express or custom. I recommend custom because you get a lot more customization options, but if you need a quick login screen, you can quickly figure your email and password field. Click on create, and now you’re going to have that login screen that’s giving access to everyone, but I prefer a custom. Under validation, here you can select a different method in how this user that’s logging in is going to be validated. So you can use the Caspio data source, which is the view that we have above here. That’s giving access to everyone. You can allow users to log in using their social media accounts. If you select this option, you’re basically bypassing this data source and allowing your users to log in, perhaps with their Gmail account. Then you can select Caspio and ID services. So this is a combination of a Caspio data source information from within this view and also social media.

 

SAML- Single Sign-On Option

And finally, we have something called SAML, which is a single sign on. If your employees already have their network credentials, they can use those same credentials to log into Caspio applications simultaneously. In this video, we’re going to focus on the very first radio button, which is the Caspio data source. Here are my two login fields, email and, password. I’m just going to rename the label instead of username to say email. And then, down below, you’re going to be able to expand some advanced settings and here you’re going to have a couple of options as well. You can have a log out destination. So when a user logs out, you can specify what URL you want them to go to. And typically, users will go to some kind of a login page or a homepage, depending on what path you provide in this field. You can also have timeout and redirection. For security reasons, you can specify if the user is not active in the application, you can automatically log them out after a specific time period. You can enable cross-application logins so users can log into multiple applications all at once. You can also allow only one session per user. So go ahead and play around with these options later on. There’s a lot of helpful settings here that can enhance your applications. But what I’m going to do now is just click on, create and give this a name and call it all access login.

 

I have to build three more for each of the views. So let’s set up our second one, and let’s go with the admin. So I’m going to select my active admin view, custom, recommend it. And I’m just going to rename the label, just say, email. Click on create, and let’s call this RM for resource management, admin login. And you can see how quickly I was able to build that login interface. Let’s build our third one. And this time, I’m going to select maybe admin and managers, custom, recommend it, and very quickly just say, email. Click on create, RM, admin manager login. And the final login interface is for the managers. So let’s click on new authentication, select manager login, custom, recommend email, and click on create. RM, manager, log in. This concludes the video on how to build the views to fill throughout based on the user and the account status check box.

 

Separate Users Based on Access

This is how we separate users based on who’s going to have access to what information at a later time. Once you have the views created, you’re going to build the login screens on top of those views. And using those login screens, we’re going to be able to provide access to each user role, and they’re going to be redirected to a specific URL to what they have access to. Join me in the next video, where I show you how to consolidate these login screens into a single login screen. And based on who’s logged in, they’re going to be taken to a different URL in order to access their own dashboard. Also, in the next video, we’re going to learn how to build all the forms and reports. In other words, all the functionality. So I hope I’ll see you in part four of this video guide. Thanks for watching part three. And I’ll see you there.

 

Next Steps

NEW IDC WHITE PAPER
See why low-code developers are growing 3x faster than traditional developers.
TALK TO AN EXPERT
Have a vision for an application? Talk to a Caspio product expert and we’ll help you achieve it.
SEE CASPIO IN ACTION
Want to see if Caspio is a good fit for your needs? Choose a date and time for a personalized demo.