Java portlet customization depending user belongs an OID group

Hi
I have developped a Java portlet with a customization display, depending user belongs a specific OID group or not.
I used a preparedStatement to call the wwsec_api.is_user_in_group PL/SQL procedure.
My problem is that it seems that OID does not close connections as our portal falls after 2 or 3 days when I install this portlet in production.
Therefore I wonder if there is a bug in the API wwsec_api.is_user_in_group (if it close OID connection after returning the boolean result).
Is there a more efficient way in a Java portlet to check if a user belongs an OID group ?
Is there a bug in wwsec_api.is_user_in_group ?
Thanks for your help,
Best Regards,
Jean-Christophe

Hi Rajiv,
I tried out the following code for getting the database reference which I got from some posts on net.
tcDataProvider db;
                    tcUtilityFactory tcu;
                    ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
                    final Hashtable env2 = config.getAllSettings();
                    tcu = new tcUtilityFactory(env2, "xelsysadm","Password");
                    tcBaseUtility mBaseUtil = (tcBaseUtility) tcu.getUtility("Thor.API.Base.tcUtilityOperationsIntf");
                    DBReference=mBaseUtil.getDataBase();
But when I execute the code, I get an error :
Error while getting utility Thor.API.Base.tcUtilityOperationsIntf[Ljava.lang.StackTraceElement;@619eeaaThis must be at the getUtility method call.
Can you please guide me as to what I might be doing wrong here?
Thanks,
$id

Similar Messages

  • Java portlet customization depending user in a group

    Hi
    I have developped a Java portlet with a customization display, depending user belongs a specific OID group or not.
    I used a preparedStatement to call the wwsec_api.is_user_in_group PL/SQL procedure.
    My problem is that it seems that OID does not close connections as our portal falls after 2 or 3 days when I install this portlet in production.
    Therefore I wonder if there is a bug in the API wwsec_api.is_user_in_group (if it close OID connection after returning the boolean result).
    Is there a more efficient way in a Java portlet to check if a user belongs an OID group ?
    Is there a bug in wwsec_api.is_user_in_group ?
    Thanks for your help,
    Best Regards,
    Jean-Christophe

    We used Java JNDI API's to check if a user was in a group, but were unable to get what are the list of groups the user is a memeber of.,
       * Checks if the specified userDN is a member of the specified groupDN.
       * @param userDN  Distinguished name of the user
       * @param groupDN Distingushed name of the group
       * @return  true - if the user belongs to the group, else false
       * @exception NamingException if any directory operation fails
      public boolean isUserInGroup(String userDN,String groupDN)
        throws NamingException {
        boolean ingroup = false;
        // Filter to check if the user DN is a member
        // A user is a member of a group if the uniqueMember attribute of that group entry
        // has the user DN value.
        String filter = "(uniqueMember="+userDN+")";
        // Initialize search controls to search with scope as sub tree
        SearchControls searchControls = new SearchControls();
        searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE) ;
        // Set the attributes to be returned
        searchControls.setReturningAttributes(new String[]{"cn"});
        // Search under the specified group
        NamingEnumeration  results = dirctx.search(groupDN, filter, searchControls);
        // If the search has results, then the user is a member
         if (results.hasMore()) {
             ingroup = true;
         }  // else user not present, i.e defaulted
         return ingroup;
      }Regards
    Elango.

  • User belonging to multiple groups

    Hi,
    If a user belongs to multiple workgroups, Podcast capture should ask him in wich blog he wants to publish its sequence... but it doesn't seem to work.
    So my question is : how to deal with that ?
    Thanks for your help,
    Nicolas

    Hi
    I know only 2 ways to add some dynamic: posting to user's blog, which supposes to consider that there is only one user who is able to post, otherwise to duplicate workflows and change the target group in it ($$Group Short Name$$ replaced by custom properties or if posted through webUI defined by new field, but it's reliability depends of the human factor..).
    In addition, i may ask you what do you mean by "it doesn't seem to work"..? Is Pc Capture supposed to work this way and ask at any moment to which group's blog the podcast needs to be sent when a user belongs to multiple groups ? That would be a terrific news, but i guess they would have announced it..
    ju
    Message was edited by: JulienC

  • Determine if user belongs to Authorization Group.

    My requirement is I have a authorization group (BRGRU) and I need to check if the logged in user belongs to that authorization group. Is there any FM for this or a Database table where in I can get list of users belonging to a particular authorization group.

    Hi
    check the tables
    UST12
    AGR_1252
    and check the Tcode SU21
    see the doc about authorizations:
    In general different users will be given different authorizations based on their role in the orgn.
    We create ROLES and assign the Authorization and TCODES for that role, so only that user can have access to those T Codes.
    USe SUIM and SU21 T codes for this.
    Much of the data in an R/3 system has to be protected so that unauthorized users cannot access it. Therefore the appropriate authorization is required before a user can carry out certain actions in the system. When you log on to the R/3 system, the system checks in the user master record to see which transactions you are authorized to use. An authorization check is implemented for every sensitive transaction.
    If you wish to protect a transaction that you have programmed yourself, then you must implement an authorization check.
    This means you have to allocate an authorization object in the definition of the transaction.
    For example:
    program an AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT <authorization object>
    ID <authority field 1> FIELD <field value 1>.
    ID <authority field 2> FIELD <field value 2>.
    ID <authority-field n> FIELD <field value n>.
    The OBJECT parameter specifies the authorization object.
    The ID parameter specifies an authorization field (in the authorization object).
    The FIELD parameter specifies a value for the authorization field.
    The authorization object and its fields have to be suitable for the transaction. In most cases you will be able to use the existing authorization objects to protect your data. But new developments may require that you define new authorization objects and fields.
    http://help.sap.com/saphelp_nw04s/helpdata/en/52/67167f439b11d1896f0000e8322d00/content.htm
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    Authorization : An authorization enables you to perform a particular activity in the SAP System, based on a set of authorization object field values.
    You program the authorization check using the ABAP statement AUTHORITY-CHECK.
    AUTHORITY-CHECK OBJECT 'S_TRVL_BKS'
    ID 'ACTVT' FIELD '02'
    ID 'CUSTTYPE' FIELD 'B'.
    IF SY-SUBRC <> 0.
    MESSAGE E...
    ENDIF.
    'S_TRVL_BKS' is a auth. object
    ID 'ACTVT' FIELD '02' in place 2 you can put 1,2, 3 for change create or display.
    The AUTHORITY-CHECK checks whether a user has the appropriate authorization to execute a particular activity.
    This Authorization concept is somewhat linked with BASIS people.
    As a developer you may not have access to access to SU21 Transaction where you have to define, authorizations, Objects and for nthat object you assign fields and values. Another Tcode is PFCG where you can assign these authrization objects and TCodes for a  profile and that profile in turn attached to a particular user.
    Take the help of the basis Guy and create and use.
    Reward points if useful
    Regards
    Anji

  • Users belonging to a group

    Hello,
    I want to make a (daily) job in which i send an email to application express users belonging to a certain group.
    Where in the database can i find the groups a user belongs to ?
    The users are in the APEX_WORKSPACE_APEX_USERS view, but where are the groups.
    When i run the following procedure on a sql*plus client on my machine, it doesn't give the groups; when i run this command from apex (sql workshop), it does ? What can be the reason for that ?
    declare
    regel varchar2(20000);
    cursor c_u is
    select *
    from APEX_WORKSPACE_APEX_USERS au;
    begin
    for l_u in c_u loop
    regel := APEX_UTIL.GET_GROUPS_USER_BELONGS_TO(p_username => l_u.user_name);
    dbms_output.put_line(l_u.user_name || ',' || l_u.email || ',' || regel);
    end loop;
    end;
    Regards, Sjang

    Sjang,
    APEX_UTIL.GET_GROUPS_USER_BELONGS_TO requires the workspace ID global package variable to be set, which is not the case in SQL*Plus, unless you set it.
    Try connecting as a schema that is mapped to the workspace you're interested in and do this:
    begin
    wwv_flow_api.set_security_group_id;
    end;
    If the schema is mapped to more than one workspace, you need to do it like this:
    begin
    wwv_flow_api.set_security_group_id(99999999999999999);
    end;
    ...replacing all those nines with the result of this query in SQL Workshop (connected in the appropriate workspace):
    select v('WORKSPACE_ID') from dual;
    Then try the query.
    You should be able to do that in your job as well.
    Scott

  • Users belonging to multiple groups

    What will happen if I attempt to create a policy with two different groups each with different rights but a single user is a member of both groups? If I apply the policy to a document where one group cannot print and the other can, will the user that is a member of both groups be able to print? Will the Policy Server take the better of the two groups or whichever one it finds first?

    Hi Dave,
    Policy Server takes the union of all permissions that the user has as members of different groups, so it is additive. In the example you provided, the user would be able to print as long as there were a member of some group that had the print permission.
    Hope this helps,
    -Bill

  • How to check logged in user belongs to particular group using workflow

    HI All,
    I have a list  and I want o implement row level security based on the list filed called Relevant group.
    I have a list filed called RelevantGroup , this filed is a choice filed and it has  couple of SharePoint site's groups that I have created. Now what I want to do is give current logged in user to edit the record based on his/her security group. For example
    if I logged in and if I m a member of  the current record RelevantGroup I can edit the record, if I m not a member of the RelevantGroup then the system shouldn't allow to edit the record. 
    I want to do this SharePoint designer workflow. Can someone please help me. Using SPD2013. 
    Thanks. 
    d.n weerasinghe

    Is the form being served up from livecycle? If not how is the form being served up to the user?

  • Check user belongs to a particular sharepoint group in sharepoint 2013 designer workflow

    Hello, How to validate a user belongs to a particular sharepoint group in sharepoint designer 2013 workflow.

    You can make a REST call from workflow to determine if a user belongs to a group.
    REST API reference and samples
    Calling the SharePoint 2013 Rest
    API from a SharePoint Designer Workflow
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Any Simple Way to check wheter the user is belongs to SharePoint Group in Client object model

    Hi All,
    Generally we follow these steps to check whether user belongs to this perticular group:
    1.Get the "Group" object from the Group Collection based on the group name
    2.Get all UserCollection from the "Group" object
    3.Take a loop and check with each user object (eg User.ID="777473844")
    I am thinking this is time taking process( if group has more than 100 members).
    Do we have any shortway to check whether user is belongs to this perticular SharePoint Group?
    Thanks in Advance!
    Thanks,
    Mahesh Yamana
    Mahesh@SharepointSolutions

    Hi Mahesh,
    Below is a CSOM JS code to check whether a user belongs to a group. We get the current user object, and then the list of Groups which the user is part of. And then check if the required group is present or not in the collection.
    function retrieveWebSite() {
    var clientContext = new SP.ClientContext.get_current();
    this.oWebsite = clientContext.get_web();
    this.oCurrentUser = this.oWebsite.get_currentUser();
    this.oUserGroups = this.oCurrentUser.get_groups();
    clientContext.load(this.oUserGroups);
    clientContext.executeQueryAsync(
    Function.createDelegate(this, this.onQuerySucceeded),
    Function.createDelegate(this, this.onQueryFailed)
    function onQuerySucceeded(sender, args) {
    var Group1 = "Group Name One";
    var Group2 = "Group Name Two";
    var flag = false;
    var iCount = this.oUserGroups.get_count();
    for(var i=0; i<iCount; i++)
    oGroup = this.oUserGroups.getItemAtIndex(i);
    if(oGroup.get_title() != Group1 && oGroup.get_title() != Group2)
    flag=true;
    else
    flag=false; break;
    if(flag == true)
    //Write your logic here
    function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() +
    '\n' + args.get_stackTrace());
    Ram Prasad Meenavalli | MCITP | MCTS SharePoint | MCPD SharePoint | http://www.spdeveloper.co.in

  • Self-registration user assigned to anonymous group auto

    hi experts,
    how can i make the user self-registration user belong to anonymous group,not everyone group
    best regards
    zlf

    Normally self  registered users automatically assigned to everyone group. If client needs they should automatically assign to someother group , it is the only possibility in my point.
    Ulitimately when modifying standard groups, this consultant should think about it whether modification really needed ?
    It is just an idea
    Koti Reddy
    Edited by: Koti Reddy Chimalamarri on Feb 8, 2009 12:03 PM

  • How to customize a Java Portlet

    Hi!
    I'm writing a portlet in Java, with functionality I can't get
    out of the standard Portal components.
    This portlet will be used at a couple of different places, and
    woiuld need to be differently initialized depending on where
    it's used, but I haven't found a way to do that yet.
    For a standard portlet, say a report, I can have bind variables
    that can be configured through the portlets customization menu.
    Is that possible to do with a Java portlet, and if it is, how is
    it done?
    ///Yours, Jens Carlberg

    Hi Jens,
    There are a couple of PDK articles and samples that cover this
    topic:
    A Primer on End-User Personalization
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/
    articles/primer.preference.storage.html
    How to Add Customization to your Java Portlet:
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/
    articles/adding.customization.html
    JSP Services Portlet
    HelloWorld Java Portlet
    You can also watch two recorded online eSeminars on Java portlet
    development at http://portalstudio.oracle.com/servlet/page?
    pageid=832&dad=ops&_schema=OPSTUDIO
    PDK-Java
    Building Java Portlets
    Finally, it's worth to check out the portlets in the Community
    Contributions section, as some of those demonstrate how to
    implement portlet customization.
    Peter

  • How can I get the orclownerguid (unique user number) in Java Portlet?

    Hi,
    I find a unique number for each portal user in OID, it calls orclownerguid.
    And I try to obtain this number in my portlet Java with the JPDK.
    How can I get the orclownerguid in Java Portlet with JPDK?
    thanks
    regards
    jerome laforge

    Hello,
    I just realized that I missunderstood your question.
    We have several way to pass (and send) parameter to a portlet:
    - OracleAS Portal page parameters that allow the browser user to define the way the parameter is send to the portlet
    - generic URL parameter (public parameters)
    - private paramter (a parameter that is targetted to a single portlet instance)
    In you case, you can use public parameter, but you have to explicitly says that your portlet consume URL parameters, so set the passAllUrlParams tag to true in the provider.xml file.
    Also I invite you to read the sample we have in the PDK that show how to use private parameter and page/portlet parameters, and the associated articles you can find on http://portalstudio.oracle.com
    Regards
    Tugdual Grall

  • How to retrieve which user-agent in a java portlet?

    Is there a way to get http user-agent info about which browser requested a page with a portlet from within the java portlet?
    It seems like the request.getHeader() always returns the same value no matter what browser we use.
    Have also tried portletRenderRequest.getOriginalHeader() but this method also returns the same result.
    Does the PPE replace these headers or what..?
    Regards,
    Per A Jorgensen

    Hi Per A Jorgensen,
    I see what you mean. I just deployed a simple portlet which displays the user-agent header property.
    Here are my observations:
    1. If you access the page as user1 from Mozilla, I see the following:
    Browser Agent:      Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
    2. If I now access this page from IE, as user1, then I still see my browser agent as:
    Browser Agent:      Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
    3. If I now access this page from IE, as user2, then i see the following details:
    Browser Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
    4. Now I access the same page from Mozilla (after logging out of user1) as user2, I see the following:
    Browser Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) RPT-HTTPClient/0.3-3 RPT-HTTPClient/0.3-3
    Hmm.. interesting.. it looks like, whoever access the provider first, fixes the user-agent. I need to investigate more into it to find out information as to why this is happening.
    In the mean-time, you can be rest assured that as long as you dont have multiple user's accessing the portlet as the same user, you will get the correct information.
    thanks,
    Harsha

  • How to export/import customization infromation from a java portlet?

    I created a java portlet using the methods in oracle.portal.provider.v2.personalize and oracle.portal.provider.v2.preference packages as described in the document adding.customization.pdk.java.v2.html. I am using DBPreferenceStore instead of FilePreferenceStore for my application.
    When I am migrating from development to production, how do I export/import the portlet customizations to the new environment along with the pages?

    Here is an Oracle doc explaining how to use PrefenceStores (File and limited DB)
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/ARTICLES/HOW.TO.USE.PDKJAVA.PREFSTORE.V2.HTML
    But more directly applicable, the last paragraph of the API class documentation for DBPreferenceStore explains the information needed to do this.
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/JPDK/apidoc/oracle/portal/provider/v2/preference/DBPreferenceStore.html
    It explains what table is used to store the data, the default is "JPDK_PREFERENCE_STORE2". And explains that if you use your own, you have to specify the table name in the provider.xml. Since you don't seem to know which table, the implication is that you used the default (and were lucky enough that it was installed...it wasn't on my install of the jpdk).
    You should be able to extract the appropriate data from the "JPDK_PREFERENCE_STORE2" table.
    I hope this helps.

  • Using SSO username/password in java portlet for Database Connection

    Hi all,
    We implemented java portlet with environment Oracle Application server 10.1.2 and Portal 10.1.4
    At present we are picking the database username and password and connect string in properties and our
    java class is reading the properties file and connecting to database to fetch the records.
    Our idea is to not to pick the username/password and connect string from the properties file or
    not to configure the datasource in data_source.xml.
    Our Requirement is who ever login to the Portal(SSO) our java class should pick the sso username/password and
    connect to database to fetch the record(s).
    Because our database users are one to one mapped to sso user(s) of portal.
    We request anyone to guide us how can we do it or suggest any suitable solution for our requirement.
    Thanks
    Dan Tey

    I think this is a no-go, since you cannot retrieve a cleartext password from the OID if I'm correct.

Maybe you are looking for

  • HELP-Cant sync ipod tocuh with itunes and has deleted all my itunes library

    Hello, My ipod touch wont sync with my itunes and it is supposed to do so every time i connect it, also it has deleted my entire itunes library, how can i sync it and how can i restore my library??? THNX U ALL, Yamileth

  • Download for Adobe CC desktop app?

    Creative cloud uninstalled while updating (no longer on my computer). The installed apps are still up and running. How and where can I download the desktop-app (again) for Adobe CC? Because I can't find a download anywhere on the website...

  • How do you add signature block to images

    I am switching from a PC platform to Mac and from Adobe to Aperture 3.   In Adobe is it easy to add a Signature to a image file for (c) however I cannot seem to find the magic in Aperture to do this.   I have found that a lot of things are so simple

  • Has anyone seen this problem? :(

    Hey Everyone, I picked the new white 30 gb ipod video up yesterday. I opened it set it up and transfered all my vids and music. Now my problem is the clickwheel. It scrolls about 200 (literally songs at a time and is not acurate with the amount of co

  • Oracle 8i XML Support (Urgent !)

    Hi I would like to know the support offered by Oracle 8i for storing XML documents in database and querying on them. What component of 8i offers this support and in what way is it different from support offered by PLSXML ? I am looking to store XML d