How to query Group based on User? isMemberOfGroup?

EP6 SP2...
I am trying to find a way to see if a user is a member of a certain group.
But am having no luck.
I tried using the IUser.isMemberOfGroup()...
but I am not sure what the arguments(String arg0, Boolean arg1) should be.
If I want to know if the logged on user is a member of "Group A", what would my code be?
I tried...
<b>IUser User = request.getUser();
if (User.isMemberOfGroup("ExternalBW", true))
{ do this }
else
{ do that }</b>
In my case, I would have expected to <i>do this</i>.
What should the String arg be for isMemberOfGroup? The name of the group?

Hello Eric,
The first argument is a Unique Group Id, you can find it in User Administration->Roles->Navigate to the role->Edit->copy the content of "Unique ID" field.
The second argument is <b>true</b> if you what to search recursively, means if the user assigned to a group.
Best Regards,
Dmtiry

Similar Messages

  • How to query which Tcodes specified user used with one day?

    Hi guys:
      How to query which Tcodes specified user used with one day?

    Hi
    You can use transaction code ST03N.
    1. Go to tx code - ST03N
    2. Under "Workload" you can select your "Instance or Total" so that it expands and shows you Days, Week, Month.
    3. If you want to look at the transactions executed for a particular day, lets say, then double click on any day.
    4. At the bottom left you get "Analysis Views"
    5. Select & expand "User and Settlement Statistics"
    6. Double click on "User Profile"
    7. On the right side of the window you get a list of all the users
    8. Double click on a particular user you want to view the details of.
    9. The new screen will display the "Transactions/Reports Utilized by User XXX"
    If you wanna track which users executed a particular transacation then follow this:
    10. In "Analysis Views" expand "Transaction Profile"
    11. Double click on "Standard"
    You can view the list of Transactions and Reports.
    12. Double click on the Tx Code or Report you wanna check and it will show the Use of it.
    This will help you.
    Regards
    Sumit Jain
    [reward with points if the answer is useful]

  • PowerShell Script: How to query a current logon user in part of E.G AD group domain1\Group1 ?

    Hi Scripts guys,
    I am new to powershell . I would like to achieve the following :
    1. to check e.g if current logon user is member of .e.g. to domain1\group1
    if yes then execute another
    a. do a subst of a: to d:
    b. follow by executing the 2nd cmd e.g execute.ps1  
    else exit and
    proceed with execute.ps1
    please advice how best to achieve this ? Thanks in advance for your help :)

    When testing the "current user" for group memberships, I prefer to do it locally using the user's logon token rather than having to query the directory. This has the advantage of automatically dealing with nested group memberships, and working
    with local / builtin groups as well. Something along these lines:
    function Test-CurrentUserIsMember
    [CmdletBinding()]
    param (
    [Parameter(Mandatory = $true)]
    $Group
    $sid = $Group -as [System.Security.Principal.SecurityIdentifier]
    if ($null -eq $sid)
    $account = $Group
    if ($account -isnot [System.Security.Principal.IdentityReference])
    $account = [System.Security.Principal.NTAccount][string]$Group
    try
    $sid = $account.Translate([System.Security.Principal.SecurityIdentifier])
    catch
    throw "Group '$Group' could not be resolved to a Security Identifier"
    return ([System.Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains $sid)
    if (Test-CurrentUserIsMember -Group 'DOMAIN1\Group1')
    # User is a member of the group (directly, or via nested group memberships.)
    Write-Host "Is Member"
    else
    # User is not a member of the group.
    Write-Host "Is Not Member"

  • BI Bex Query prompt based on User's Authorization....

    Hi
    In BI, I created 1 BEx Query based on Authorization. If a user runs the query, it prompts for 'Customer Name' to get data of particular customer. And Customer values are populated in the prompt based on User's Authorization.
    For example:
    User1 is authorized to see data of Customer1 & Customer2. So, Query prompt will show 2 values: 'Customer1' & 'Customer2'.
    But User2 is authorized to see data of Customer1, so Query prompt will show 'Customer1' only.
    I created 2 variables on Customer field:
    1) Authorization Variable in Filter Section
    2) Manual, Single Entry, Mandatory on Default Value section.
    My Requirement:
    If user is authorized to link with only 1 Customer, he should not get prompt & on the background prompt value should be populated from his authorization value. But if user is authorized to see multi-customers, then prompt should appear.
    If possible pls. provide some suggestions....
    Thanks...

    Yes, this can be done.
    but there is little work around.. Using guided navigations
    1. Create a report with column fx as case when 1=0 then markets.region else user() end
    2. apply filter on this column is equal to User_1
    3. Create another report with column fx as case when 1=0 then markets.region else user() end
    4. apply filter on this column is equal to User_2
    5. Now add all your prompts to dashboard, but each prompt should in each section object of dashboard.
    6. For first section click on section properties, go to Guided Navigation...
    7. Browse Source Request as first report.. and keep If request returns rows selected.
    8. Repeat above step for another section.. but this time browse 2nd report.
    9. Just save dashboard.
    Check now..
    Hope you understood..
    Regards
    Kishore Guggilla
    Edited by: Kishore Guggilla on Feb 18, 2009 12:57 PM

  • How to get PERNR based on user ID

    Hi All,
    How to get PERNR based on userid.
    please help me in resolving this.
    Thanks for the support.
    Regards,
    Dhananjaya R E

    hope this will help u
    DATA:   t_pernr LIKE pa0105-pernr,
              t_email LIKE pa0105-usrid_long.
    STEP 1 - Find personnel number for UNAME
       SELECT SINGLE pernr
                 INTO t_pernr
                 FROM pa0105
               WHERE subty = '0001'
              AND endda >= sy-datum
             AND begda <= sy-datum
             AND usrid = p_uname.
    Employee record found*
    IF sy-subrc = 0.
    STEP 2 - Find email address for personnel number*
    SELECT SINGLE usrid_long
             INTO t_email
             FROM pa0105
            WHERE pernr = t_pernr
              AND subty = '0022'
              AND endda >= sy-datum
              AND begda <= sy-datum.

  • How to create a Query iView based on user's parameter?

    Hello,
    I've created a Query iView which depends on a Costumize parameter that the user enters - On stage 5 of the wizard I've entered a customize parameter on a certain field and called it "user_param". The wizard entered the Query: WHERE... = {$user_param}. So far so good...
    My question is, after creating this iView, how Do I implement it at the Portal so the user will have a place to enter his parameter and receive the result?
    when opening the Query I don't see such place. According to SPA's documentation, the user should enter the parameter at the "personalize" menu. When I put this iView in a page and open the "Personalize" menu there is no such place.
    Which further configurations should I do in order it to work?

    If you open the iview, there should be a personalize property or setting for the URL parameter. Make sure that it is set to read/write. I just got off a portal project where I did a few of these, but I don't have access to one right now, so I can't give you the exact steps, but you should get the idea.
    Good luck,
    Tom \

  • How to implement a Query iView based on user's parameter?

    Hello,
    I've created a Query iView which depends on a Costumize parameter that the user enters. My question is, after creating this iView, how Do I implement it at the Portal so the user will have a place to enter his parameter and receive the result? I tried simply put it on a Page but that didn't do the job... which configurations should I di in order it to work?

    hello,
    does anybody find a clue to solve this problem?
    thx!

  • How to create groups and assign users thru program

    Hi,
    I am planning to create groups by program and assign users to them based on some condition.Once users are assigned to those groups we need to change the Language value for those users in User profile
    We are using Central User Administration.
    Please let me know the solution
    Thanks
    Bala Duvvuri

    probably you can use this code to create a group
    IGroupFactory groupFact = UMFactory.getGroupFactory();  
    IGroup group = groupFact.newGroup(wdContext.currentContextElement().getGroup()); 
       group.commit();
    for this required com.sap.security.api.jar

  • How to HIde rows based on User Selection

    I have a requirement where in I have to hide some rows based on Plant Name selected by USer at the time of opening the report.
    Here is the screen  shot:-
    Here I am seeing two Tag Types MACT and Average when User selects  Luling Plant. But When User selects some other Plant I don't want to see Tag Type 'MACT' in this table.
    We have a predefine filter for Plant.
    How can I achieve that. The data in White Rows is Average values.
    Please help.
    Regards

    Hi Shalini,
    Is user selecting Plant Name from the report prompt. If Yes, then try below-
    Create a variable-
    FilterSelect= If UserResponce("WritePromptTextHere") =" Luling Plant" and TagType inList ("MACT";"Average") Then 1 ElseIf  UserResponce("WritePromptTextHere") <>" Luling Plant" and TagType inList ("MACT";"Average") Then 3 Else 2
    Apply Filter on "FilterSelect" variable-
    FilterSelect=1 and 2
    ~Anuj

  • How to Manage Group of database users

    hellooooo
    how i can create user(application administrator) who have responsability of group of user as a follow:
    user administrator1
    The group of users only (user1_1, user1_2, user1_3 ..... etc)
    And also user administrator2
    The group of users only (user2_1, user2_2, user2_3 ..... etc)
    And so on
    So that any one of them (administrator1, administrator2, ... etc) can create or delete or modify users and
    set roles and read all roles and privileges ,only on users that belong to them (administrator1, administrator2, ... etc).

    Hi Forstmanon,
    As far as I know, there is no way with SQL to restrict CREATE USER or ALTER USER statements to specific user accounts.
    So what you intend to do seems impossible with SQL.Correct me, what could be the problem.. ?? As they are privi's too which are assigned to specific user. :-) I agree that grouping can't be carried out.
    OP,
    hellooooo
    how i can create user(application administrator) who have responsability of group of user as a follow:
    user administrator1
    The group of users only (user1_1, user1_2, user1_3 ..... etc)
    And also user administrator2
    The group of users only (user2_1, user2_2, user2_3 ..... etc)
    And so on
    So that any one of them (administrator1, administrator2, ... etc) can create or delete or modify users and
    set roles and read all roles and privileges ,only on users that belong to them (administrator1, administrator2, ... etc).As you have stated, try to check the what all roles (Privileges required - precisely by User..) and assigned that privs to a specific role. Next have to two different Administrators Accounts (Perhaps, if you are providing sysdba to them, then can perform any thing across the users - grouping might not possible).
    - Pavan Kumar N
    - ORACLE OCP - 9i/10g
    https://www.oracleinternals.blogspot.com

  • How to create  DynPage based on user parameter and than implement it?

    Hello,
    I've written a Portal Application which contains a Portal Object which is a DynPage.
    I am using NWDS for development and NW 04 Patch 11 as the portal.
    This DynPage process something according to a hardcoded URL. I would like to transform this URL to a parameter which will be received from the user.
    Can someone please explain me the whole process with a simple example that includes:
    1. How to change the code/project to receive parameter from the user?
    2. How to change the iView configuration which is based on this PAR file to send the user parameter.
    3. Where the user should enter it's parameter once all done?
    Thank you.
    Roy

    Hi Roy,
         If i understand your question properly, then you should do the following. This will let you change the value globally for all the users as an iview parameter. If you edit the iview then you will see the property that you have added to portalapp.xml.
    1. Modify your portalapp.xml to accept iview personalization.
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="links_tree">
          <component-config>
            <property name="ClassName" value="com.sap.sen.gcp.km.links.links_tree"/>
            <property name="SecurityZone" value="com.sap.sen.gcp.km.links/high_safety"/>
          </component-config>
          <component-profile>
            <b><property name="url" value="/documents"/></b>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>
    3. The following code will get you the value of path.
    IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    IPortalComponentContext myContext = request.getComponentContext();
    IPortalComponentProfile profile = myContext.getProfile();
    <b>String url = profile.getProperty("url");</b>

  • Query Differentiation based on User Designation

    UR,
    Interesting situation ... I am just guessing here but I guess this must be possible...
    For creating queries in production - create two roles ...
    X Query creation - use RS_COMP and give create / modify for queries X*
    create one similar for Y*
    Assign both roles to your super users and X* for your power users ..?
    I am not sure if I have got the component right but there is a component that can be used to control query access by X* or Y*...

    Hello Eric,
    The first argument is a Unique Group Id, you can find it in User Administration->Roles->Navigate to the role->Edit->copy the content of "Unique ID" field.
    The second argument is <b>true</b> if you what to search recursively, means if the user assigned to a group.
    Best Regards,
    Dmtiry

  • How to show pages based on user logged in adf security ?

    Hi All,
    JDev ver : 11.1.1.4.0
    I have three Roles MANAGERS, ADMIN, ANALYST with users in each role.
    And i used form based authentication. There are seperate screens for each user, i want to show according to the user entered with Roles.
    How to Configure these roles in Resource Grants and what should be done in login action..
    For me the page now going forward, it remains in the login page itself
    How to do that ?
    thanks,
    Gopinath

    Hi..
    try out following sample
    http://andrejusb.blogspot.com/2011/05/oracle-webcenter-11g-ps3-adf-security.htmlalso check this >http://andrejusb.blogspot.com/2009/01/practical-adf-security-deployment-on.html

  • Dynamic change in the query name based on user input

    Hi Gurus,
    In a scenario, country appears as a user input variable.When the user specifies his country, the same query displays <b>Business trends</b>' data pertaining to his own country and rest of the world(international) in two tables.The reports are developed using Web application designer.
    Can the name(description) of the query be changed  so that the user input value for country gets dynamically reflected in the query name like <b>Business trends:Selected country vs International</b>?
    Regards,
    Balaji

    Hi Bala,
      ya this can be done by text variables. create a text variable( replacement path on the country infoobject) by going to the query properties on the description.
    if the user enters country value then it will be displaed on the description of the query .
    assign points if useful .
    regards
    santosh

  • How to create groups and add users?

    Hello,
    I have created 3 groups as Portal_Admin and added 2 users for each group.
    When I am trying to grant permissions to these groups to the Applications owned by Portal30( I have logged in as portal30 at this point), I am unable to see these groups but am able to see these individual users.
    I am trying to grant access to individual menu items/sub menus of a Portal Menu.
    Is it correct way to do things?
    Or am I wrong somewhere?
    My Idea:
    I would like to create 20 users 10 of each belong to particular Oracle schema and then organize these 20 as groups
    who will access certain application objects.
    I wanted to give Admin an option to add/del/modify users to and from a Group once initial setup is done.
    We really stopped here.
    Your help is appreciated.
    Thanks
    Madhav

    It's a bug.
    Type the name of the group you want to add the user to and click apply, if you typed it correctly the the group name will appear.
    We are building a fix for this.
    Portal PM

Maybe you are looking for