Panel Name | fwAccessControl/fwAccessControl_Export.pnl | |||
Introduction |
Export Access Control data panel
This panel is used to export the Access Control data: domains, groups and users definitions.
It is considered as a helper tool for developers who need to distribute certain elements
of the access control data, namely the definition of domains and privileges, with their
code.
Selecting the objects to exportThe main part of the panel is made of two lists: the list on the left allows to select the domains, groups, or users to be added; the right list contains the objects that are chosen for export. A set of buttons between the two list allow to move the items between the lists, hence add or remove objects from the Selected Object list on the right. The objects on the right list will be exported when the button is pressed.
To add an object to a list of selected ones, choose the type of the object: "Domains", "Groups" or "Users"
in the combo-box above the left list, then select the name(s) of the object (note that you may select
multiple objects if you hold CTRL key while clicking on the items), then press the Dependency resolving
The panel contains the mechanism which assures that the data being exported is coherent and complete.
For every imported user it checks if all groups, to which the users belong, are also exported;
for every exported group it checks if all domains in which the group has access rights are exported.
This consistency checking is performed on the list of objects currently selected for export
(present in the rightside list), when the Log Window with the
list of dependencies is displayed, asking whether the objects which are needed to fulfill the dependencies
should be added to selection; accepting this results in these objects being appended to the rightside list.
Only if all dependencies are fulfilled, the actual export may go on. |
|||
Instructions |
|
|||
Restrictions |
|
Return Values from panel | ||
The panel should be opened using functions from the
ChildPanel...Returns(... , df,ds) family. When the panel is closed the following values may be returned in the df and ds parameters:
| ||
Variable | Value(s) | Description |
dyn_float parameter (df[] ) | ||
df[1] |
1 |
button was pressed and export operations were succesfull |
df[1] |
0 |
button was pressed or an error was encountered |
dyn_string parameter (ds[] ) | ||
ds[] |
|
contains the lines of the code (in PVSS scripting language), that may be embedded into a script,
and used to import the access control data.
The code defines the void postInstall_fwAccessControl(dyn_string &exceptionInfo)
function.Typically, the code has a form similar to presented in the following example: void postInstall_fwAccessControl(dyn_string &exceptionInfo) { string acComponent="fwAccessControl"; string acVersion="2.5.0"; int acInstalled; fwInstallation_componentInstalled(acComponent, acVersion, acInstalled); if (!acInstalled) { makeDynString(exceptionInfo,"ERROR","Access Control component "+ acVersion+" not installed","");return;}; if (!dynlen(exceptionInfo)) fwAccessControl_checkAddDomain("MyDCS", makeDynString("Monitor Me","Control","Debug Him","Modify"), exceptionInfo, "MyDCS controls", "MyDCS control system"); if (!dynlen(exceptionInfo)) fwAccessControl_checkAddGroup("DCSOperators", makeDynString("SYSTEM:Visualize","MyDCS:Monitor","MyDCS:Debug","MyDCS:Control"), exceptionInfo, "DCS Opeators", "A group of DCS shift operators"); if (!dynlen(exceptionInfo)) fwAccessControl_checkAddUser("joe", makeDynString("DCSOperators"), exceptionInfo, "Joe, the Operator", "tel. XXXXX", "xxxxxxxxxxx", 4096, TRUE); } |