Author Topic: "Update Elements" permission disrespected  (Read 4911 times)

mlk

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
"Update Elements" permission disrespected
« on: June 23, 2013, 06:53:24 pm »
Context: Security is enabled. User has no "Update Elements" permission granted. Addin works in the context of that user. The user is trying to change name of an element  via addin. The element is not locked.

Problem: When addin invokes EA.Element.Update()  there is no exception and GetLastError is empty. The user changes element's name. At the same time read only privillige is respected only by EA GUI (the user cannot change the name via Project Browser) .

Question: How to deal with it in code? How to guard repository against an unauthorized access?

Any help appreciated.

Maciek

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: "Update Elements" permission disrespected
« Reply #1 on: June 24, 2013, 04:16:59 pm »
I guess you'll have to query the users security rights and act accordingly in your add-in.

You'll have to use SQL I'm afraid because I don't think there direct API access to security rights.

Geert

mlk

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: "Update Elements" permission disrespected
« Reply #2 on: June 26, 2013, 12:22:00 am »
Thanks Geert. It means EA has a gap in security management functionality.

I don't even know how can I be sure, that from the last GetCurrentLoginUser invocation the logged user didn't change his credentials by logging as someone else.

Maciek