Example of administrative user management
The example shows the runtime user management and is created from the Preconfiguration "Runtime users management"
application objects preconfiguration.
- Example is placed in the folder: /Pm/Examples/AppExamples.
- This example is functional also as Web application.
- Located in the application tree: /Examples/PreCfg/AdminUsers
- In order to run this example it is necessary that the user is logged in as ADMIN (no password).
In the AdminUsers
main panel, there is a table containing the user list and function buttons, that can be used in order to add, delete, edit or change password of the users. The panel contains methods that are called from the panel and execute the desired actions. The user values and settings are saved in to the users.csv
file in the Data
folder of the application by the SaveUsers
Adding users into the running application is solved by the InitUsers method. This method is called after the SaveUsers method, but it must also be called right after application launch (PmRoot application, Events page, onAppStartEnd event).
This kind of user management cannot display or edit users created in the development environment (saved into *.pra or *.ini).