Is there any way to add user from PL/SQL? I would like to manage add/remove users from code, not in admin menu"Security/Repositories". Is it possible? Thank you very much |
Hi Simrob, Yes, this is possible indeed. There are internal API's to achieve this. The internal API's are not as convenient to use as the external API's but you can certainly achieve what you've described. To create a user, the following procedure in the API package
set Next, to give a role to your new user, call the following procedure in the API package
Finally, Formspider uses a denormalized table to quickly read keys for each user. You need to populate that yourself. To achieve this, you should first find out the ID of the user you created and the ID of the role (or roles) you gave to it. You can do this by calling the following SQL:
:userName is the user you created and the :repoName is the name of security repository you created it in. Similarly, find the ID of the Role (or roles) you gave to the user using the following SQL for each role.
Now you can populate the denormalized table. Call the following procedure for each role you gave the user.
Commit your changes and you should be set to go. Hope this helps. Kind Regards, |