Is it possible to create / manage user from within and Oracle APEX application?

I have developed an application in APEX for some engineers at my company, but twice a week they call my desk asking me to add another user. Is there a way to create a user creation page in an APEX application so that it can be fully handled by users?

+3


source to share


2 answers


To create a new user outside the APEX environment, you can use PL / SQL. Make sure you set the security group to the ID of the workspace for which the new user will be created. Run this statement as database system user See the following code:



  declare
    l_workspace_id number;
    l_group_id     number;
  begin
    [...]
    l_workspace_id := apex_util.find_security_group_id('Your Workspace Name');

    apex_util.set_security_group_id(l_workspace_id);

    l_group_id := apex_util.get_group_id('Your User-Group');

    apex_util.create_user(p_user_name           => 'Your User-Name',
                          p_email_address       => 'eMail Address',
                          p_first_name          => '...',
                          p_last_name           => '...',
                          p_default_date_format => '...',
                          p_web_password        => '...',
                          p_group_ids           => l_group_id,  
                          p_default_schema      => '...');

    [...]
  end;

      

+1


source


Sure. If you want to create an APEX user, you can use the procedure APEX_UTIL.CREATE_USER

.



Depending on the situation, it would be more common to create your own table user

, custom authentication procedure, and then modify your application to use that custom authentication procedure, rather than for use by APEX users. This makes it easier to manage more complex permissions (for example, applications that support multiple different roles) or to integrate with other authentication providers such as LDAP / Active Directory.

+3


source







All Articles