Extending the Functionality

Top  Previous  Next

Since almost all the component elements of the Security component are process based, you can easily extend the provided functionality depending on your needs.

For example; you may wish to perform a special task after an user logs on to the system; like recording the login time in a database table. In such a case all you have to do is add a "mor > RelDB > RelDBUpdateProcess" element into the ProcessBlock element and configure it in the Process List property of the ExecuteCommand element.

ExtendingFunctionality

 

Maintaining Additional User Information

Similarly you can maintain additional information for the user other than the standard user information.

To attach, for example, a DEPT (Department Name) attribute to user info, you can add an extra input field into the Process Block and define it in the SML.

See below how the user attribute DEPT (Gray colored) is added to the CreateNewUser Element.

AddingUserAttribute

 

To create a new input field, i.e. 'DEPT' in the process block:

1.Copy and Paste the text and the input element of Full Name.
2.Name the input element "DEPT"
3.Modify the SML Property of the SMLProcess Element as follows

 

Before Modification:

 

CreateUser(username, password, fullname, email, disabled)

@doif(defaultrole != '')

  AddRoleToUser(username, defaultrole)

@doend()

 

 

After Modification:

 

SetVar('DEPT',DEPT) @// That will create a broker variable named 'DEPT'

CreateUser(username, password, fullname, email, disabled)

@doif(defaultrole != '')

  AddRoleToUser(username, defaultrole)

@doend()

 

 
Please note that to maintain an additional field such as 'DEPT' requires modifications not only on the user interfaces but also on the security broker to be used.

See Security Brokers.