Principally, when speaking about web components on the desktop, one would maybe instantly turn towards web-security features to build your security functions in your application. This however will NOT work.
It won't work for reason of the fact that the WAS (Web Application Server) is not engaged in WCD. There are no session variables. I have talked about this with Selwyn Rabins, and the conclusion after ample research is, that web component security will not work within WCD. So, what next?
Of course there is always the option to design your own security functions and system. Alpha Five has everything you need aboard to do this. You can create a table for users, you have encryption functionality, you can develop functions that exactly shape the security in your application the way you want it.
There is another option, and that would be to use the standard A5 desktop security system.
I have done some research in this area and the conclusion is, that WCD is perfectly suited to use the A5 desktop security system and even so without much added programming. Of course, it all depends on WHAT and HOW DEEP it is that you want in terms of security, BUT that said, basic security allowing access to components based on the group the user belongs to is perfectly and easily possible.
Time for some examples.
When you engage the A5 desktop application security system, before anything else, the login dialog is shown. You can style this dialog to some extend, as you can see in the image below where text is in Dutch.
Security login web.jpg
This in fact determines to what components the user has access once logged in. We can influence the access the user has in several ways, each with its own pro's and cons. In this example, we make use of groups. Each groups gets certain rights. Users belong to one or more of those groups. I have created a dialog component that takes care of calling the security setting functions. This component is accessible to ALL users. Although the component is, the actual settings are NOT since the buttons that allow access to those functions are only showed to users that belong to the "administrators"-group.
Users that do NOT belong to the administrators group get to see a text that points them towards their system administrator.
Security users and groups web.jpg
As you can see in the picture above, this is what a user gets to see when he belongs to the "administrators"-group. One of the functions has been opened, where the admin can create user accounts and connect them to a certain group. The user that does NOT belong to the "administrators"-group gets to see THIS in the component:
Security no access web.jpg
Actually, this is a text that says to the user to contact his system administrator if he wants something changed to the security settings.
As this is an example of how you can show the component, but show different content to each user group, there of course is also the option to decide to show the whole component (and not just content on it) to a user group, and NOT AT ALL to another. This can be done at TUI level where the Tabbed UI component serves as your menu in WCD applications. You simply add an expression to the show/don't show expression statement.
That expression could be something like this: a5_userbelongsto("Administrators")=.T.
This function is honered by Alpha Five and workes in the component environment. So you can simply place and use such expressions either on components themselves (at frame level where you show or don't show whole frames plus content) or you can place them at TUI level where you simply hang this expression on the button that opens a certain component. The button will then be visible (or not) depending on the group the user belongs to.
So, in terms of application security, one can use the built-in Alpha Five desktop security system as a base to control any WCD application.
It won't work for reason of the fact that the WAS (Web Application Server) is not engaged in WCD. There are no session variables. I have talked about this with Selwyn Rabins, and the conclusion after ample research is, that web component security will not work within WCD. So, what next?
Of course there is always the option to design your own security functions and system. Alpha Five has everything you need aboard to do this. You can create a table for users, you have encryption functionality, you can develop functions that exactly shape the security in your application the way you want it.
There is another option, and that would be to use the standard A5 desktop security system.
I have done some research in this area and the conclusion is, that WCD is perfectly suited to use the A5 desktop security system and even so without much added programming. Of course, it all depends on WHAT and HOW DEEP it is that you want in terms of security, BUT that said, basic security allowing access to components based on the group the user belongs to is perfectly and easily possible.
Time for some examples.
When you engage the A5 desktop application security system, before anything else, the login dialog is shown. You can style this dialog to some extend, as you can see in the image below where text is in Dutch.
Security login web.jpg
This in fact determines to what components the user has access once logged in. We can influence the access the user has in several ways, each with its own pro's and cons. In this example, we make use of groups. Each groups gets certain rights. Users belong to one or more of those groups. I have created a dialog component that takes care of calling the security setting functions. This component is accessible to ALL users. Although the component is, the actual settings are NOT since the buttons that allow access to those functions are only showed to users that belong to the "administrators"-group.
Users that do NOT belong to the administrators group get to see a text that points them towards their system administrator.
Security users and groups web.jpg
As you can see in the picture above, this is what a user gets to see when he belongs to the "administrators"-group. One of the functions has been opened, where the admin can create user accounts and connect them to a certain group. The user that does NOT belong to the "administrators"-group gets to see THIS in the component:
Security no access web.jpg
Actually, this is a text that says to the user to contact his system administrator if he wants something changed to the security settings.
As this is an example of how you can show the component, but show different content to each user group, there of course is also the option to decide to show the whole component (and not just content on it) to a user group, and NOT AT ALL to another. This can be done at TUI level where the Tabbed UI component serves as your menu in WCD applications. You simply add an expression to the show/don't show expression statement.
That expression could be something like this: a5_userbelongsto("Administrators")=.T.
This function is honered by Alpha Five and workes in the component environment. So you can simply place and use such expressions either on components themselves (at frame level where you show or don't show whole frames plus content) or you can place them at TUI level where you simply hang this expression on the button that opens a certain component. The button will then be visible (or not) depending on the group the user belongs to.
So, in terms of application security, one can use the built-in Alpha Five desktop security system as a base to control any WCD application.
Comment