Skip to content

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 you edit a hybrid app in Mobile Services cockpit, available feature plugins are listed on the Client Policies screen. Feature plugins are typically JavaScript APIs that provide access to the native APIs of the mobile device (implemented as Apache Cordova plugins, for example, Camera, Calendar, and Push). You can indicate features that should be restricted from the user.

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 null

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.

Note

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).

  1. In Mobile Services cockpit, select Mobile Applications > Native/Hybrid or SAP Mobile Cards.

  2. Select an application, then select Mobile Settings Exchange under Assigned Features.

  3. 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).
  4. (Optional) Select create 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.js file, which appears in the project after you add a plugin ("pluginId").
    Display Name A feature plugin that is available with the application, such as Camera, Calendar, and Push.
    Plugin Name Plugin name.
    Description A feature plugin description, such as Cordova Camera Plugin, Cordova Contacts Plugin, and SAP Push Plugin.
    JavaScript Module A comma-separated list of all JavaScript modules that are used by this plugin. The JavaScript Module value is the JavaScript API that is used to invoke the plugin.
    Allowed Indicates whether the feature is allowed or restricted. By default, features are allowed.
  5. (Optional) To remove a plugin from the application, select it, click delete, and confirm.


Last update: August 12, 2020