GetPermission - method of object PmObject
Getting permission of corresponding protected operation from object in application tree
GetPermission(sName As String, sParams As String) As Variant
permission = oObject.GetPermission(sName, "what:groups;")
|sName||(String) Protected operation permission name.|
|sParams||(String) A text list of additional parameters defining which information to be obtained. Entries with assigned value are separated by a semicolon, 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 ',').
This method is especialy handy for testing protected operations (with corresponding permission) beforehand, i.e. sooner than the operation itself is executed or fails.
Testing whether the locally logged-in 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 user complies with the permission.
Set oPanel = Pm("/Panel1")
sGroups = oPanel.GetPermission("PanelOpen", "what:groups;")