cancel
Showing results for 
Search instead for 
Did you mean: 

Web Dnpro ABAP: authorizations and configurations

preethi_santhanam
Participant
0 Kudos

Hi,

I have a few questions regarding Web Dynpro ABAP executing from the portal.

1. How can I restrtict a user from executing the application , so that the application is only executed via portal and not by tweaking the url or as a standalone application? Is it by using static parameters? Or via portal variable or event?

2. I have a user1 who can create a record and another user2 who can maintain records. Would creating 2 configurations help me in restricting a user1 from maintaining records, based on the role via Enterpise Portal?

I feel this is a better option as compared to creating 2 separate WDP applications?Could you please let me know your views on the same.

Thanks & Regards,

Preethi.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Thomas

How does check GET_CLIENT_ENVIRONMENT method? I am sorry I dont have an ABAP system now, but any cheat? May be using HTTP requests?

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>How does check GET_CLIENT_ENVIRONMENT method?

It is a method of the Application API class. You call it like any other method.

data lr_api type ref to if_wd_component.
  data lr_appl type ref to if_Wd_application.
  lr_api =  wd_this->wd_get_api( ).
  lr_appl = lr_api->get_application( ).

  data client_env type i.
  client_evn = lr_appl->get_client_environment( ).
  if client_env = IF_WD_APPLICATION=>co_client_environment-portal.
  endif.

preethi_santhanam
Participant
0 Kudos

Hi Thomas,

Thnaks so much for your reply. Meanwhile, Ive tried the following as well.

In WDOINIT,

DATA lo_api_component  TYPE REF TO if_wd_component.
  DATA lo_portal_manager TYPE REF TO if_wd_portal_integration.

  lo_api_component  = wd_this->wd_get_api( ).
  lo_portal_manager = lo_api_component->get_portal_manager( ).

  IF lo_portal_manager->m_portal_version IS NOT INITIAL.
    Continue with the application.
  ELSE.
    Raise message and show V_ERROR page.
  ENDIF.

This will restrict the execution of standalone application and allow when its executed from portal only.

Thanks & Regards,

Preethi.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

1. The API IF_WD_APPLICATION has a method GET_CLIENT_ENVIRONMENT that will tell you if you are running within the portal.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/036b1fdc7e22f2e10000000a1553f7/frameset.htm

You can test this value at startup and force navigation to a dummy page with just an error if the user is not running within the portal. This is how SAP does it when we have applications that are technically dependent upon the portal.

2. Neither. This is generally controller with authorization objects and authorization checks in the ABAP backend. You could create two different iView for the same applicaiton and assign them to different roles, but the best option is to also have the authorization checks with the application itself.

Former Member
0 Kudos

You have to make authorizations in ABAP system. Portal only makes authentication.

preethi_santhanam
Participant
0 Kudos

Hi Lekha,

The portal will take care of the authorization, but, how will the portal disable a standalone web dynpro application from executing?

Best Regards,

Preethi.

Former Member
0 Kudos

Aren't these maintained by the Portal Admin....Usually the portal admin will create roeles and assign them to the users thorugh configuration...