Author Topic: Api to Disable security only to one instance of EA  (Read 5913 times)

kotrick

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Api to Disable security only to one instance of EA
« 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

smendonc

  • EA User
  • **
  • Posts: 148
  • Karma: +5/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Api to Disable security only to one instance o
« Reply #1 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.

kotrick

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Api to Disable security only to one instance o
« Reply #2 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

smendonc

  • EA User
  • **
  • Posts: 148
  • Karma: +5/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Api to Disable security only to one instance o
« Reply #3 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:

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

kotrick

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Api to Disable security only to one instance o
« Reply #4 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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Api to Disable security only to one instance o
« Reply #5 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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Api to Disable security only to one instance o
« Reply #6 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.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13251
  • Karma: +554/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Api to Disable security only to one instance o
« Reply #7 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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Api to Disable security only to one instance o
« Reply #8 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.