Restrict access to business roles in Web UI
A user can set the parameter CRM_UI_PROFILE to a specific value or even * .
It’s a security risk, because a user could use a standard business role instead of the customer configured role.
The user parameter overrules any other role assignments (via the organizational management or pfcg-role),
CRM 7.0 / PFCG Roles and Authorization Concept, page 28:
Even if the parameter is set to * only allowed business roles are displayed in the pick list of the logon screen.
The enhancement spot WCF_RESTRICT_ACCESS (note 1566074) and an own defined authorization object is used to
restrict the business roles.
1. Create authorization object ZUI_PROFIL
Create the authorization field ZUI_PROFIL in transaction SU21:
Create the authorization object ZUI_PROFIL with field ZUI_PROFIL and don’t forget to re-generate SAP_ALL
2. Implement the enhancement spot WCF_RESTRICT_ACCESS
In the next step you have to implement the enhancement spot WCF_RESTRICT_ACCESS in transaction SE18.
Add the following code in method get_business_role_white_list
field-symbols <fs_role> type crmc_ui_profile.
* Get all CRM-web-UI business roles
* authority check
authority-check object ‘ZUI_PROFIL’
if sy-subrc = 0.
3. Apply authorization object to user
In the last step you only add the new authorization object with the allowed roles in pfcg role.
In the logon screen only the allowed roles are shown: