Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: kotrick on September 05, 2011, 01:46:15 pm
-
hi,
i have created few addins in EA in which i need to disable the security and run those addins.so i need the security to be disabled for only instance which i am running. all other users using EA should have security enabled.is there any api to automate the process to disable security only to one instance am working
-
Security is maintained at the repository level not at an instance level, so disabling impacts all users. Disabling will also impact locks etc., that might have been put into place. If you need to run an add-in selectively without restrictions you can log in via the Admin account or an account that has been granted Administrator permissions.
Stan.
-
Hi,Thanks for your reply.am currently doing it manually.i open EA project disable security then reload project.open one more EA open same project then enable security there.in this way the first project opened will have security disabled.and and security enabled for other users.
i want to automate this process.i hope u understood the requirement
-
I think I understand what you are trying to do, just not sure why you need to disable security to run an add-in. I can think of the following scenarios:
- You can automate starting EA with specific credentials (Admin or an Administrator account) and then use the session to automate running any add-in without restrictions, then log out.
- If you are already logged in have the Add-in run the ChangeLoginUser function to the Admin user, run the add-in and then change the credentials back
Is there a specific reason that security needs to be disabled to run the add-in?
Thanks,
Stan.
-
Thanks in advance,
I disable security as i want my addin to update the model even if it is locked by someone.
can i do that with admin passord
-
I don't think you can disable security just for a while, but you can steal the locks from your colleagues.
I don't think there's a proper API function to do so, so you'll have to play with an SQL update statement on Repository.Execute()
Geert
-
Turning off security is quite easy. Have a look into t_secpolicies and you'll find out which record you have to delete. Turning it on the same way does unfortunately not work. One needs to be a greater magician then.
q.
-
The problem is that if you turn if off like that, it is turned of for the whole model, so for each instance of the application, not only for the instance that is running the tool.
Geert
-
True. That's always the case. This will work if you have EAP files where you can do that individually (we use it this way in a special use case).
q.