Defining Feature Restriction Policy¶
Feature restriction policies enable you to control feature access for the selected application. Set these policies in Mobile Services cockpit. You can add, allow, restrict, edit, or delete features.
When a plugin, for example, the bar code scanner plugin, is in a disabled state on the server, the application starts a settings exchanges and does two things:
Invalidates the native side of the plugin
Changes the namespace of the plugin to
You may later enable a plugin on the server side, and trigger a settings exchange. At that time, although the plugin is
not present in the disabled list, the value of the
cordova.plugins.barcodeScanner namespace remains
null; this value
is reset only if a page refresh occurs, and Cordova reloads the plugin namespaces.
The new feature restriction policy takes effect after you exit the application and restart it to allow Cordova to refresh all the namespaces.
Currently, the SAP Fiori Client forcefully disables features that are explicitly disabled at the server through settings exchange. But it is a good idea to verify a specific feature is enabled before calling the feature in the Web application (or underlying component that consumes the application).
In Mobile Services cockpit, select Mobile Applications > Native/Hybrid or SAP Mobile Cards.
Select an application, then select Mobile Settings Exchange under Assigned Features.
Select Client Configuration.Under Feature Restriction Policies, you see the current status of feature restriction policies.
Column Description Name A list of feature plugins that are available with the application, such as Camera, Calendar, and Push. ID Unique identifier for the feature plugin. Allowed Indicates whether the feature is allowed or restricted.
Select if the feature is allowed (Yes)
Unselect if the feature is restricted (No).
(Optional) Select to add a feature restriction policy for the selected application, and then OK.
Field Description Name A unique feature name. ID Unique identifier for the plugin. The value comes from the
cordova_plugins.jsfile, which appears in the project after you add a plugin ("pluginId").
(Optional) To remove a plugin from the application, select it, click delete, and confirm.