The security table is a set of rules for overriding active modes and views set-out / menu-out
The namespace, privilege, state and theme attributes can all contain comma separated values.
Consider:
<fm:set-out match="/*/ORDER" ns1:mode="." ns2:mode="/*/ORDER/STATUS='C'"/>
Even though ns1 appears to be “on” here, the security table may force it “off” or to a view. ns2 is conditionally “off” (not affected), or “on” which may be overridden by the security table to “off” or to a view.
So, the security table has the last word when it comes to deciding whether something is shown.
We prefer the toggling (on/off/view) of display sets to be controlled by the security table:
XPATH: <fm:set-out ns:mode=”:{user}/PORTAL_PRIVILEGES/PRIVILEGE/@NAME='PEOPLE_SEARCH'”/>
OR
RULE: <fm:mode-rule operation=”ENABLE” namespace=”ns” privilege=”PEOPLE_SEARCH”/>
The security table is a sequential list of Condition Try Rules.
For each namespace that is provisionally deemed to be “on”, as per set-out / menu-out commands:
This rule processing approach is similar to Fire Wall Rule Table processing.
Fox actually optimises processing internally to aid performance.
The rule condition attributes test the following:
Attributes namespace and operation select which namespaces to secure and rule outcome.
The fm:security-rule name=”rule_name” condition attributes… allows tests to be defined and reused using rule-ref=”rule_name” attribute on fm:mode-rule and fm:view-rule.
Lastly, when ns:mode is specified on a command, fm:view-rule can knock it back to view.
When ns:view is specified on a command, fm:mode-rule or fm:view-rule are the only ways to disable it.
That is, you never get more access than your set-out or menu-out command asked for.
<fm:mode-rule namespace="ns1" operation="DISABLE" state="state-new"/>
<fm:mode-rule namespace="testns" operation="ENABLE" state="state-new" privilege="WORKBASKET"/>
<fm:security-list>
<fm:mode-rule namespace="fieldSearch" operation="ENABLE" privilege="PON15D_INPUT" xpath=":{user}/ORG_INFORMATION/WOT_NAME='OIL'"/>
<fm:mode-rule namespace="fieldSearch" operation="ENABLE" privilege="PON15D_SUBMISSION" xpath=":{user}/ORG_INFORMATION/WOT_NAME='OIL'"/>
</fm:security-list>
For the following exercises, you will need to log into the Portal (http://edu-app1/portal_dev8.htm) as Colin Brown (Username: CFBROWN). The DEV8 Portal has a universal password to log into any user’s account. The password is ‘dev8dev’.
After logging in, type in the URL of your XX_EMPLOYEEMODULE and click on the :{user} DOM. Confirm that the LOGIN_ID is “CFBROWN” and not “Guest”. There should be a long list of Portal Privileges. Use the Name attribute value for privilege based rules.
Practice enabling and disabling namespaces by theme, privilege (see User DOM for privileges), state and XPath (e.g. WOT_NAME in User DOM).
Experiment with multiple security rules and observe the effects of changing the order of some of the rules you create – you may need to invent more namespaces to demonstrate.
Use the rule-ref attribute in a view-rule to enable another namespace [e.g. the company info in the employee module].