How to get current IUser (com.sapportals.portal.security.usermanagement)

Hi,
does anybody know how to get IUser for the current user?
I know how to get current IUser from com.sap.security.api package:
IWDClientUser wdcu = WDClientUser.getCurrentUser();
IUser sapUser = wdcu.getSAPUser();
but I need to have IUser from com.sapportals.portal.security.usermanagement package.
Regards,
Ladislav

Ladislav,
Try this:
Get the IUser uisng the API com.sap.security.api.IUser and store it in a variable, say <i>sapUser</i>.
Then,
// Convert the logged in user to old EP5 usermanagement API
com.sapportals.portal.security.usermanagement.IUser user = null;
try
     com.sapportals.portal.security.usermanagement.IUser user = WPUMFactory.getUserFactory().getEP5User(sapUser);
catch (UserManagementException e)
     e.printStackTrace();
Bala

Similar Messages

  • IUser problem with com.sapportals.portal.security.usermanagement

    I am trying to get the current user so I have written
    IUser user = request.getUser();
    I have imported com.sap.security.api.*;
    The compiler insists I need com.sapportals.portal.security.usermanagement.IUser
    I thought that version was deprecated or at least not the preferred method?
    It keeps saying my classpath is incomplete. Why can't it use the IUser from the com.sap.security.api?
    Any help would be greatly appreciated.
    Thanks
    Paul

    Update
    The offending line appears to be IResourceContext myContext = new ResourceContext(user);
    when this line is added it causes the above error which I can only assume is because ResourceContext(user) accepts a different kind of user object. does anyone know if there is another way to do this? Here is the rest of the code to see where i am headed:
    IUser user = req.getUser();
    RID rid = RID.getRID("/temp");
    IResourceFactory factory = ResourceFactory.getInstance();
    IUserFactory uf = UMFactory.getUserFactory();
    IResourceContext myContext = new ResourceContext(user); //this is the line causing the problems.
    IResource resource = factory.getResource(rid, myContext);
    if(resource.isCollection())
    ICollection collection = (ICollection)resource;
    IResourceList children = collection.getChildren();
    Iterator i = children.listIterator();
    the point is i am trying to get the ACL permissions on the children of the rid

  • Import com.sapportals.portal.security.usermanagement.IUser;  is deprecated

    import com.sapportals.portal.security.usermanagement.IUser;  is deprecated
    Is there any alternative???

    Hi,
    could please tell me, what kind of jar-file I have to add to the project to use
    com.sapportals.portal.security.usermanagement.IUser ?
    Thank you in advance.
    Kind regards, Patrick.

  • DC for com.sapportals.portal.security.usermanagement .IUser

    Hello all,
    When developing a local application I can reference class com . sapportals . portal . security . usermanagement . IUser via NWDS local libraries using ECLIPSE_HOME variable and referencing jar file com.sap.security.api.ep5.jar.
    There is a standard DC that has this class or jar file?
    Or should I add this JAR to an external library.
    Regards,
    Mauricio

    Hi,
    You will have to add this jar as an enternal library.
    Ashu

  • Package com.sapportals.portal.security.usermanagement : No javadoc ?

    Dear all,
    I tried to find the javadoc concernig this package "com.sapportals.portal.security.usermanagement" but I did not find it.
    Does anyone have any clue where to find it please ?
    Thank you advance.
    Best Regards.
    Greg.

    Hi Greg,
    I think the reason you're not able to find is because com.sapportals.portal.security.usermanagement is now deprecated. For EP 6.0, the old classes have been re-written to map to the new UME 4.0 classes and methods contained in com.sap.security.api.
    please see the document below for details...
    USING THE NEW USER MANAGEMENT API IN EP 6.0
    https://www.sdn.sap.com/irj/sevlet/prt/portal/prtroot/docs/library/uuid/91f0cd90-0201-0010-a190-c4d7cbd5b463
    hope this helps,
    harman

  • Com.sapportals.portal.prt.service.soap.SOAPRuntimeContext

    Is there any class like com.sapportals.portal.prt.service.soap.SOAPRuntimeContext
    (which only works in the context of the portal) that can be used from an EJB environment?
    Basically, from inside an EJB, I want to get the authenticated IUser object that represents the user who called a secure web service.
    Of course, I can use code like this:
    String username = myContext.getCallerPrincipal().getName();
    IUser user = WPUMFactory.getUserFactory().getUser(username);
    The problem is the returned IUser object is not authenticated.  The call user.isAuthenticated() returns false.
    If I use the SOAPRuntimeContext object, I get an IUser object that is authenticated.  That means I can pass the IUser object to the knowledge managament APIs and preform functions as the user who logged into the web service.

    Dharmi,
    Please try this,
    Check the jar here
    New Reference for Portal APIs
    Or you can extract the parfile into your local computer and navigate to PORTAL-INF
    -> lib folder there you will find the required jar.
    Ramganesan Karuppaiyah

  • Com.sapportals.portal.htmlb

    When I was trying to delopy the Par file form eclips to the portal through Eclips I am getting errors and one of the error is -
    com.sapportals.portal.htmlb cannot be resolved.
    -How to solve this.
    I was remembering I was putting some jar files into the lib diectory or something like that, but  now I forgot that. please advic me

    Hi,
    Check this thread how to use Jar class finder tool available in Eclipse or the class locator ( check the comments area - link given by Detlev )...
    The tool will help you to locate the class/jar file thereby  you can add it directly to your project and rebuild it to nullify the error.
    <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2951">Blog link</a>
    Hope it helps.
    Regards,
    Vivek

  • NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime

    Hello,
    I have developed a Web Dynpro App, which reads the UWL items from the Portal through UWL API. After Deploying and running the application, I am getting the following error:
    NoClassDefFoundError: com/sapportals/portal/prt/runtime/PortalRuntime
    Could somebody please suggest me how to resolve this?.
    Thanks,
    Sunita.

    In WebDynpro instead of:
    PortalRuntime.getRuntimeResources().getService(IUWLService.ALIAS_KEY)
    you can use:
    WDPortalUtils.getServiceReference(IUWLService.ALIAS_KEY)

  • How to get current view name on clicking device back button?

    Hi,
    iam wriing a function for handling device back button(in android) press in my app.controller.js .How to get current viewname when clicking device back button.
    code samples will be helpful.
    my app.controller.js looks like below
    sap.ui.controller("com.opensap.App", {
      onInit : function() {
      document.addEventListener("deviceready", onDeviceReady, false);
      onBeforeShow : function(evt) {
      navButtonTap : function(evt) { 
    function onBackKeyDown(){
      //alert("hai");
      //sap.ui.getCore().byId("SalesDetail").app.backToPage("ProductList");
      //sap.ui.getCore().byId("ProductList").app.backToPage("Dashboard");
      //sap.ui.getCore().byId("SupplierDetail").app.backToPage("Dashboard");
    function onDeviceReady(){
       document.addEventListener("backbutton", onBackKeyDown, false);

    I somehow managed to find the solution
    function onBackKeyDown(){
      var app = sap.ui.getCore().byId("LoginDetail").app;
      app.back();

  • How to get current version of safari. without having safari browser?

    how to get current version of safari. without having safari browser?

    I don't understand the question. Safari is a browser.
    Can you elaborate on what your are trying to do that initiated the question? People may be able to come up with some other option that gets you working the away you want.
    When you respond, please post the version of the Mac OS and the version of Safari you currently have. Otherwise, people are guessing and the quailty of help you get plummets.

  • How to get current rowindex of clicked object in cr2008 preview control

    hi
    i want to get selected raw data when user click on crystal report 2008 preview control.
    i can achieve using following code for particular row no.
    Dim repReport as new ReportDocument
    repReport.Rows(RowIndex).Item(ColumnIndex)
    how to get current rowindex ? 
    Thanks
    Sanjiv Sharma

    Only way I can think of is to use the rowset controller from the InProc RAS SDK. Here is a snippet of a sample code on how to:
    //Load the report
    if (clientDoc != null) {
    //create metadata structure
    RowsetMetaData rowSetMetaData = new RowsetMetaData();  rowSetMetaData.setDataFields
    (clientDoc.getDataDefinition().getResultFields());
           Fields fields = rowSetMetaData.getDataFields();
           String colName,colTypeName;
           int colType, len;
           Field field;
           HashMap colNames = new HashMap();
           HashMap colTypes = new HashMap();
           for (int i = 0; i < fields.size(); i++) {
                   field = (Field) fields.get(i);
                   colName =field.getDisplayName(FieldDisplayNameType.description, Locale
    .ENGLISH);
                   colNames.put("COL"+i,colName);
           colType = getColTypeFromVariant(field.getType().toVariantTypeString());
           len=field.getLength();
                  //Placeholder
            //add column metadata to data structure or XML
            Object colValue;
            int rowCount=0;
            if (getMaxRows() != 0) {
                   RowsetCursor rowsetCursor = clientDoc.getRowsetController(). createCursor
    (null, rowSetMetaData);
                  //Setting the batch size to make sure that you get back all the
                  //rows by setting the batch size.
                        clientDoc.getRowsetController().setRowsetBatchSize (rowsetCursor
    .getRowset().getTotalRecordCount());
               //Getting the Results back starting from the first row
               RowsetCursor resultCursor = clientDoc.getRowsetController(). createCursor(null,
    rowSetMetaData);
               resultCursor.moveTo(0);
                  while (!resultCursor.isEOF()) {
                      for (int i = 0; i < fields.size(); i++) {
                               colName=(String)colNames.get("COL"+i);
                               colTypeName=(String)colTypes.get("COL"+i);
    colValue=record.getValue(i);
                                //Placeholder
    //add row data to data structure or XML
    resultCursor.moveNext();
    For more details, consult the Report Application Server .NET SDK Developer Guide
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How to get current row data in table control

    Hi , expert ,
       I am professional in oracle ,  but  now I am a new guy in SAP ABAP .
    I  have a question in UI
    How to get current row data and click pushbutton  in table control  to open next screen ?
    I want to get the current data and open next screen to carry out detail detail .
    Thansk for all your suggestion .

    GET CURSOR LINE SY-CUROW .
      READ TABLE internal_table index SY-CUROW.

  • My I-Pad 2 keyboard will not pop up when trying to sign in to web sites. Does anyone know how to get it to come up?

    My i-pad 2 keyboard will not pop up with trying to sign into a web site or Facebook..  Does anyone know how to get it to come up?

    Make sure you click in the text box for username and password to bring up the keyboard.
    Try powering off your iPad by holding the power button and sliding the red slider when it appears, or try resetting your iPad by holding the power and home buttons together until the apple logo appears.
    I would also highly recommend an app for facebook, it's called MyPad.

  • How to get Current row of ViewObject in the DoDML methode

    Hi all
    I have two ViewObject EmplyesView and DeptView
    How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesView

    OK, we can play this game on and on...
    I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don't give any info we don't already know. After an other 10 posts we probably know what you real problem is and can give you the advice which you could have gotten in the fist place.
    So please take some time and describe the problem as if you would ask your mother for help. Tell us how the data model is build and how the VO are related. Is there any input from an user involved? Which information from the other view do you need? How do you get to the doDML method? Is there a button in the ui involved?
    Timo

  • Com.sapportals.portal.ivs.cg.ConnectionProperties jar file location ?

    Hi ,
    Could anyone let me know the exact jar location for com.sapportals.portal.ivs.cg.ConnectionProperties class for NW04s SP11 . Thanks.
    Regards
    Vasudevan

    Hi,
    The class mentioned is in com.sap.portal.appintegrator_api.jar. It can be found on the server under location \j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.appintegrator\lib.
    Do reward points if the information is helpful.
    Regards,
    Donald

Maybe you are looking for

  • Error help- "the operation could not be performed ...file... doesn't exist"?

    Hi, I am experiencing some probmels with ICE and can't find a reason for why.  I was able to edit the pages on the site through ICE about a month ago, but the client just let me know they can't do anything for any page.  I also can't do anything for

  • Oracle.jbo.domain.Number / Date comparable ?

    Hello, I'd like to know whether there was a plan to make the oracle.jbo.domain.Number and oracle.jbo.domain.Date classes implement the Comparable interface? That would save some unnecessary wrapping code... Thanks in advance, Remi

  • Help  needed!!!!! Setting up connection to data warehouse.

    Hi all, i am currently having a project which requires me to  integrate SAP BO and BI. And  for now i have to first integrate them by setting up the connectivity. How should i connect the dw to the BO( and vice versa if possible ) ? Can anyone guide

  • Foreign fonts

    I created a project using Director MX 2004 (on a Macintosh). I need to translate it in to Hungarian, Russian, Chinese, and Japanese. Where can I get these foreign language fonts that can be used with Director MX 2004?

  • Any difference in buying ipad from verizon or apple?

    Verizon will be my carrier and have always liked their customer service. But if I need real technical ipad help and buy from Verizon, can I still get apple online support or at apple store? Any recommendations are welcome.