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

Similar Messages

  • 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

  • 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

  • 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 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

  • "Domain Users" group in Active Directory does not belong to any Group Membership in LC

    Active Directory user belonging to "Domain Users" group does not belong to any Group Membership in LC, why does it not belong to "Domain Users" group?
    Any way to correct this issue, without changing group membership on AD side?
    If Active Directory user is member of "Domain Admins" or "Users" then these show same group membership in LC.
    Thanks.

    If you want to use the Domain Users group for the purpose of representing all the users then you can use the "All principals in domain xxx" group which is created by UM.
    Coming back to Domain Users group. For determining group membership in AD UM uses "member" attribute of the group object. "Domain Users" group is treated differently by AD. It is the default primary group for all the users and normally members of the primary group are not specified using the member attribute.So when we sync the data from AD "Domain Users" membership does not get completed.

  • Problems to restrict access to a page when the user belong to more than 1 group

    I have realized that Dreamweaver on a coldfusion document only works fine when the user only belongs to a single group, this is because the code supplied by dreamweave when you use the option "Restrict access to a page" at "Server behaviors" it assumes that the user only have one group as you can see on this line created automaticly by dreamweaver:
    <cfif MM_Username EQ "" OR MM_UserAuthorization EQ "" OR ListFind("admin",MM_UserAuthorization) EQ 0>
    MM_UserAutorization has the value of the field assigned for the list of groups or levels, as you can see it could work if we reverse the parameters of the listfind function but the problem would be if we grant the access to more than one group because the sentence would be like this:
    <cfif MM_Username EQ "" OR MM_UserAuthorization EQ "" OR ListFind("Admin,Manager",MM_UserAuthorization) EQ 0>
    so both paramethers are lists therefore no user will get access to the page.
    I am trying to make a work around to fix this problem but I don't know how to get the name of the page since the Application.cfc so I can validate the access to this page against tables on my database.
    Does someone have a work around or a tip how to fix this problem?
    Thanks in advance.
    AG

    Seems like you have a problem with your group names.ctxLdap.modifyAttributes(groupName,member);Ensure that the value of your variable groupName is a a valid distinguished name.
    Note that an OU (organizationalUnit) is not a group. You do not add users to OU's, you create users in OU's.

  • How to retrieve the groups a user belongs to?

    Hi,
    I want to write some code which will retrieve all the groups a user belongs in.
    The JAZNUserAdaptor class has a getGroups() method which returns a Set which I iterate through as follows;
    JAZNUserAdaptor jaznuser = (JAZNUserAdaptor)p;
         strFullName = jaznuser.getFullName();
         strRealmName = jaznuser.getRealm().getName();
         strRealmFullName = jaznuser.getRealm().getFullName();
    Set aSet = jaznuser.getGroups();
    Iterator anIter = aSet.iterator();
    Object myObject = new Object();
    while (anIter.hasNext())
    myObject = anIter.next();
    System.out.println("Object To String");
    System.out.println(myObject.toString());
    int aSize = aSet.size();
    String aa = String.valueOf(aSize);
    System.out.println("Size : " + aa);

    Resubmitting
    Hi,
    I want to write some code which will retrieve all the groups a user belongs in.
    The JAZNUserAdaptor class has a getGroups() method which returns a Set which I iterate through as follows;
    JAZNUserAdaptor jaznuser = (JAZNUserAdaptor)p;
    Set aSet = jaznuser.getGroups();
    Iterator anIter = aSet.iterator();
    Object myObject = new Object();
    while (anIter.hasNext())
    myObject = anIter.next();
    System.out.println(myObject.toString());
    The above produces the output
    [JAZNGroupAdaptor: RealmRole: jazn.com/pats_sit]
    [JAZNGroupAdaptor: RealmRole: jazn.com/guests]
    [JAZNGroupAdaptor: RealmRole: jazn.com/users]
    Is there a better way to do this? What type of object is returned from anIter.next()? Is it JAZNGroupAdaptor and where is this class defined?

  • How to get List of SharePoint Groups to which Current Users belongs using Javascript ?

    How to get List of SharePoint Groups to which Current Users belongs using JavaScript? Not JSOM

    Here is the code that worked for me:
    var userid= _spPageContextInfo.userId;
      var requestUri = _spPageContextInfo.webAbsoluteUrl + '/_api/web/CurrentUser/Groups?$select=Id,Title';
    alert(requestUri);
      var requestHeaders = { "accept" : "application/json;odata=verbose" };
      $.ajax({
        url : requestUri,
        contentType : "application/json;odata=verbose",
        headers : requestHeaders,
        success : onSuccess,
        error : onError
      function onSuccess(data, request){
    var s='';
     for (var i = 0; i < data.d.results.length; i++)
    s +=data.d.results[i].Title+'\n';
        alert(s);
      function onError(error) {
        alert("error");

  • Getting the Windows groups a user belongs to.

    I'm using the JAAS package, and have used the NTSystem class to get the current domain and user that is running my application. What I would like to do is determine if that user belongs to a specifically named windows group (i.e. Administrators, Users, Guests, oneIMadeUp). Using the JAAS package, I'm able to list the groupSIDs, which is just an unintelligble list of numbers.
    There must be a simple way to just list the groups a user belongs to, so I can check in my code against a specific group, and then allow/deny certain functions running.
    Any ideas?

    Resubmitting
    Hi,
    I want to write some code which will retrieve all the groups a user belongs in.
    The JAZNUserAdaptor class has a getGroups() method which returns a Set which I iterate through as follows;
    JAZNUserAdaptor jaznuser = (JAZNUserAdaptor)p;
    Set aSet = jaznuser.getGroups();
    Iterator anIter = aSet.iterator();
    Object myObject = new Object();
    while (anIter.hasNext())
    myObject = anIter.next();
    System.out.println(myObject.toString());
    The above produces the output
    [JAZNGroupAdaptor: RealmRole: jazn.com/pats_sit]
    [JAZNGroupAdaptor: RealmRole: jazn.com/guests]
    [JAZNGroupAdaptor: RealmRole: jazn.com/users]
    Is there a better way to do this? What type of object is returned from anIter.next()? Is it JAZNGroupAdaptor and where is this class defined?

  • How to implement a single user in mutiple AD groups?

    Hi all,
    I need your help in achieving the following requirement.
    1. Security should be applied based on a DeptName from DeptTable For example Department Name= A , Department Name =B, Department Name =C.
    2. Also security should be based on Officer Indicator from EmployeeTable= Yes or No.
    3. Employee Salary information is grouped into EmpFacts in presentation folder. Only a few users who belong to the group which has access to the folder, should be able to see this folder when they login.
    (DeptAOfficerYesEmpFactYesSuper. All the groups which has EmpFactYes are given permissions to EmpFact Folder in presentation Folder)
    4. On top of these all the users are classified into Mega and Super users. Mega users should have read only access to dashboards and Super users should be able to edit the dashboards. ( All the groups which are classified as Super are given access to "Edit Dashboard" in Presentation Catalog )
    NOTE: As we are deploying our rpd in the shared environment we are not supposed to use SESSION VARIABLES.
    TO achieve the above requirement we have created AD groups such that DeptAOfficerYesEmpFactYesSuper , DeptAOfficerNoEmpFactNoSuper and so on. By this method all the permutation and combinations will result in AD groups.
    We know that this approach will lead to severe maintenance issues and hence looking for other alternatives.
    We are now planning to have only DeptA, DeptB, DeptC groups and use them in conjunction with three other groups ( Officer, EmpFact, Super).
    Can we add a single user in all these user groups ?
    Kindly let me know if you need any clairty on this.
    Your help is highly appreciated.
    Edited by: user10682075 on May 11, 2011 7:24 PM

    Yes and no..meaning a user with just 1 group assigned will retrieve less data then a user with multiple groups assigned, so yes, more data to select will affecct your performace (a bit), but no, the use of multiple security groups by itself won't affect performance..
    The use of multiple security groups will reflect in the use of an IN or a subquery in your logical query, OBI will determine the best way in each case and your database (and statistics) will determine the best physical query and therefore query performance.
    M.

Maybe you are looking for

  • Analytic View activation fails because of a Calculated Measure

    I'm working with HANA SPS02 here. Step 1 I have an Analytic View where I have CALDAY among Private Attributes and VALUE in Measures. I add an Attribute View with UCALDAY (whatever it means) and implement a new calculated measure CALCVAL with logic as

  • HT201343 Macbook & Apple tv

    I have an older macbook pro, but just updated my operating system to the latest. How can I connect to the apple tv now? I go to display and tell it to mirror etc, and nothing happens. Please help

  • Cleaning up multi- CSS files

    Hi Folks! I have build my first RH project (Webhelp and AIR) by importing topics from an existing system. Initially, Imported all my topics and THEN organized them into folders and build my TOC from the folders. We need to cleanup the existing master

  • Suns standard classes use of constants - bad coding convention

    Wasn't sure where to post this, it didn't quite fit into Java Runtime Environment or Java Virtual Machine forums. I was browsing through The Java Standard classes and was amazed by their use of constants. Throughout the codes there is inserted direct

  • I thought this article/series might be of interest

    From Tom's Hardware - a survey of Linux Software.  He makes some good points and also he was surprised at just all that was available for Linux: http://www.tomshardware.com/reviews/lin - ,2407.html