Defining Feature Restriction Policies

Feature restriction policy enables you to allow and restrict specific features for an
application. Set these policies from Management Cockpit. You can add,
allow, restrict, edit or delete features. This gives you additional control over the
SAP Fiori Client application features
.

Context

When you edit a hybrid app from Management Cockpit, available
feature plugins are listed on the Client Policy 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 barcode scanner plugin, is placed into 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 (for example, barcode scanner) is not present in the
disabled list, the cordova.plugins.barcodeScanner name space
remains null. This null value only
gets reset when 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).

Procedure

In Management Cockpit, select ApplicationsClient Policy.

Under Feature Restriction Policies, view the current status of feature
restrictions.

Column

Description

Plugin

A list of feature plugins that are available with the
application, such as Camera, Calendar, and Push.

ID

Unique identifier for the application.

Allowed

Indicates whether the feature is allowed or restricted.

If a feature is enabled, a checkmark appears in the
Allowed column. Click the checkmark to disable
it.

If a feature is restricted an exclamation mark (!)
appears in the Allowed column. Click the exclamation
mark to enable it.

(Optional) Click Add to associate a new feature with the
application.

In the Add Feature Restriction Policy window, enter:

Field

Description

Name

Feature name.

Plugin

A list of feature plugins that are available with the
application, such as Camera, Calendar, and Push.