Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: kotrick on September 05, 2011, 01:46:15 pm

Title: Api to Disable security only to one instance of EA
Post 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
Title: Re: Api to Disable security only to one instance o
Post by: smendonc on September 06, 2011, 08:00:28 am
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.
Title: Re: Api to Disable security only to one instance o
Post by: kotrick on September 06, 2011, 03:09:08 pm
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
Title: Re: Api to Disable security only to one instance o
Post by: smendonc on September 06, 2011, 03:36:37 pm
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:



Is there  a specific reason that security needs to be disabled to run the add-in?

Thanks,
Stan.
Title: Re: Api to Disable security only to one instance o
Post by: kotrick on September 23, 2011, 02:38:28 pm
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
Title: Re: Api to Disable security only to one instance o
Post by: Geert Bellekens on September 23, 2011, 05:19:16 pm
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
Title: Re: Api to Disable security only to one instance o
Post by: qwerty on September 23, 2011, 06:04:47 pm
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.
Title: Re: Api to Disable security only to one instance o
Post by: Geert Bellekens on September 23, 2011, 06:08:57 pm
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
Title: Re: Api to Disable security only to one instance o
Post by: qwerty on September 23, 2011, 07:24:01 pm
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.