Show TOC Entering content frame

Function documentation Authorization of Unbound Controls Locate the document in its SAP Library structure

Use

This function determines the access rights to unbound controls, for example, access rights to buttons on a tile for a specific authorization role. This function requires you to carry out activities using the Authorization Management Tool (AMT) as well as Mobile Application Studio (MAS).

Example

In the Mobile Sales application, the Campaign tile contains the Copy button. This tile is used in the Details tile set of the Marketing business component. The Copy button is enabled by default even for the users who have “read-only” rights. To disable the Copy button based on the access rights of a user, you must:

§         Carry out certain authorization activities using AMT

§         Make changes to the application code of the corresponding mobile client application using MAS

 

Prerequisites

You have:

·        Identified the tile that contains the required unbound control

·        Identified the business object that is associated with the tile, and protected it. For more information, see Restrict Access to a Business Object.

·        Ensured that MAS is installed on the Mobile Development Workstation

 

Activities

This function includes various activities to be carried out by different users and the various activities the system performs.

·        During design time, the user of AMT:

                            a.      Defines necessary access rights to the tile. For more information, see Providing Access to a Tile.

                            b.      Defines a token and assigns access rights to the protected business object. For more information, see Defining an Authorization Token.

·        During design time, the user of MAS:

...

                            a.      Makes changes to the application code by using the businessobject.rights method, with the following syntax:

This graphic is explained in the accompanying text

Private Sub mCore_onLoad()

If Not (apasoverviewDSOPrd.bcol.Item(currentpos).Rights >= authCreate) Then

        ctrlctrlCopy.editmode = cemReadonly

     Else

        ctrlctrlCopy.editmode = cemNormal

     End If

End Sub

                            b.      Generates the mobile client application

·        During runtime, the system:

...

                            a.      Checks that the authorization feature is enabled

                            b.      Checks the access rights defined for the tile

                            c.      Enables or disables the unbound control based on the access rights defined for the tile   

Leaving content frame