Role-Based Security for Business Apps

Blog



Role-Based Security for Business Apps


I recently starting building an Alpha Anywhere web application that required role-based security for business apps.
 
As you may know, Alpha Anywhere has a role-based security system that can easily be administered from the Alpha Anywhere Developer (IDE).
 
 
But in this case,  I wanted to allow users and groups (a.k.a. roles) to be administered online via a web interface. That way administrators don’t need to have Alpha Anywhere installed - they can simply add, remove, and edit users using a web browser. This is an easy way to administer role-based security for business apps.
 
To help build out this kind of administrative interface, Alpha Anywhere includes a handful of UX templates. They can be found in the list of templates when you create a new UX. There are seven in total, five for administration and two for login.
 
 
However, none of them were quite what I wanted. I liked the simple interface that was found in the Alpha Developer, which had two lists - one for users and one for groups to which they can be assigned.
 
 
So, this being Alpha Anywhere, I decided to create my own. It was pretty easy, though I did have to do a little bit of coding to create what I wanted. In particular, I wrote a few Xbasic callback functions that use the Context.Security object.
 
Details on that object can be found here:

 
The result was this simple, but effective interface:
 
 
There are buttons for adding and deleting users, and you can add a user to a group simply by clicking on the user and clicking the Add User to Group button. This opens a window that lets you select from the available groups.
 
In future iterations, I plan to add a User Info button in which I can view and edit details about the user, such as their phone number, customer ID, and other details. But for now this suits my needs. If you think you could use something like this in your project, feel free to grab the files from out Github account. The project is small and self contained. You just need the UX Component (which you can add to your own A5W page), and the two SVG files - which are the icons that appear next to the words Users and Groups in the interface.
 
 
Furthermore, this has been tested on both the Alpha Anywhere Standard Application Server, where I did my testing, and the Alpha Anywhere Cloud, where it has been deployed. Since the cloud is IIS based, it should run on the Alpha Anywhere Application Server for IIS as well. Also - it was created using responsive design, so you can even add and remove users via a mobile phone or tablet, should you wish.Want more security ideas and tips?  Join us on our Wednesday Q&A Webinars by registering here.
Mobile B2B Apps are hard to build - see why Companies are turning to Alpha
How To Choose The Best Tool For Building Mobile Field Service Apps

About Author

Dave McCormick
Dave McCormick

Dave has a long history with Alpha and has a deep understanding of developers and the information they need to make informed decisions. He has developed numerous videos, print tutorials and other materials that make the developer's job easier. Dave joined the company in 1992, and served as support engineer, technical writer, and documentation department manager. Between 1998 and 2005, Dave was at Stumpworld Systems and was product manager for Online Merchant/Online Merchant Gold, which became the best-selling e-commerce application in the U.S. retail market. Prior to rejoining Alpha in In 2006, Dave started A5-Online, a hosting provider for Alpha Five Web applications. Dave received an Award of Achievement from the Society for Technical Communication for the Alpha Five User's Guide in 1995. He holds a bachelor's degree in management information systems from the University of Arizona.

Related Posts
How Oil and Gas Mobile Apps Improve Productivity and Safety
How Oil and Gas Mobile Apps Improve Productivity and Safety
How to Reengineer Yourself as a Mobile Developer
How to Reengineer Yourself as a Mobile Developer
Updating Mobile Apps Just Got WAY Easier
Updating Mobile Apps Just Got WAY Easier

Comment

Subscribe To Blog

Subscribe to Email Updates