Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Examples of user permissions settings in the application

The system of users allows designers to create protected PROMOTIC applications.

Example of non-strict web setup

The following procedure of application setup allows un-logged Web clients to freely view enabled panels. After the Web client is logged-in successfully, also the secured panels will be enabled for viewing.

Procedure:
 
1) In the PmaWeb object disable the "Strict mode of network users login into the application requiring the use of both name and password" configurator.

2) Select a panel that will be used as overview screen (it can also be a toolbar).
 
This panel will have on the "Permissions" tab in the configurator WebRead and WebWrite set $ANY_NET. And in the "WebMethods" configurator set the authorized group, for example $OPER.
 
On the "Methods" tab create an empty user method with no parameters, for example TestUser.

3) In the graphics editor add two groups of buttons to this panel.
 
One group of buttons will open the panels that are not secured. These panel will have in configurators WebRead, WebWrite and WebMethods set $ANY_NET.
 
The second group of secured panels will have in the same configurators set $OPER.

4) In the buttons that open the secured panels, on the "Object" tab in the "Control enabled" configurator set the binding Data binding E - Data binding to the general expression. For the control variable v1, the binding Data binding UP - Data binding to the logged user property will set Property of logged-in user to Name ($db.UP(0,"Name")). And in the expression the following syntax will be used v1!="".

5) Then create one button for logging the user and the PmgString object named TxtUser that will display the logged-in user.
 
In the PmgString object, on the "Text" tab, in the "Value" configurator, the Data binding UP - Data binding to the logged user property binding will be used and set Property of logged-in user to Name.

6) In the button for user login, there will be the following script in the onButtonUp event:
Example:
JavaScriptSelect and copy to clipboard

if (pMe.Root.ClientType == 1)
Pm.WndLogon(true);
else if (pMe.Items("/TxtUser").Value != "")
Pm.WndLogon(true);
else
pMe.PmPanel.Methods.TestUser();
PROMOTIC 9.0.16 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
 
- Examples of user permissions settings in the application
 
 
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice