2007. szeptember 30., vasárnap

Adding password security to your app with paradox


Problem/Question/Abstract:

Adding password security to your app with paradox

Answer:

I'm using a method to implement password security to your app using paradox.

First you make a table having a username field, name, password etc.. and you add Rights fiels type alpha(100) and a Level field of the same type.
Then in the app you got to use an actionlist to center all the commands your users will have access to.
The key here is to manage which action the user has right to use base in the rights field and (optionally) what level of access tha user has for the given action.

I use the tag property of each action in the actionlist to put the value of an accii char.
So, the first action will have a tag value o 65 the next 66,and so on.

Whe the app starts and acepts a user, it must check the chars of the Rights field againts each action's tag, if there's a macht that action is enabled.
So if a user has 'ABCZDH' in his/her rights field then will only have access to those actions marked by the asccii value in their tags.

Off course all of this comes with a nice screen where an 'administrador' can activate/deactivate the users's rights.

Nincsenek megjegyzések:

Megjegyzés küldése