Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Role-Based Security for Business Apps With Alpha Software

DZone's Guide to

Role-Based Security for Business Apps With Alpha Software

The role-based security system in the Alpha Anywhere developer can help you control security permission in your app. This article explains how.

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

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. You can get the component here.

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.

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:
mobile ,mobile apps ,app security ,alpha anywhere

Published at DZone with permission of Dave Mc, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}