Promotic
WikipediaLinkedInYoutubeTwitterFacebook

GetPermission - method of object PmaObject

Description:
Returns permission of corresponding protected operation from object in the tree of Pma objects
Syntax:
Variant GetPermission(String sName, String sParams)
Calling:
permission = oObject.GetPermission(sName, "what:groups;")
Parameters:
sName(String) Protected operation permission name.
sParams(String) Additional parameters defining which information to be obtained. Entries are in KeyVal format, for example "what:groups;".
"what:sss;" - The basic setting defining what to return.
what:groups; - Permission in the form of text list containing group and user identifiers (comma separated ',').
Note:
This method is especialy handy for testing protected operations (with corresponding permission) beforehand, i.e. sooner than the operation itself is executed or fails.
Example:
Test whether the local user has the permission to open specific panel beforehand. The "PanelOpen" permission of the Panel1 panel is obtained. Then the testing proceeds in order to find out whether the local user complies with the permission.
JavaScriptVBScriptSelect and copy to clipboard

var oPanel = pMe.Pm("/Panel1");
var sGroups = oPanel.GetPermission("PanelOpen", "what:groups;");
if (Pm.TestUserInGroup(0, sGroups))
//...

History:
Pm8.03.00: Created
PROMOTIC 9.0.6 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice