Book a Demo

Author Topic: Access to Security (User/Groups) via Java API  (Read 4996 times)

Toni Menzel

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Access to Security (User/Groups) via Java API
« on: August 09, 2013, 11:43:00 pm »
Hi again,

i did not find an API to access (read/write) the User/Group information in the eaapi.jar. Is it not accessible or am i just blind? Any chance to see it in future versions?
Am i correct that the only way to access it is using direct SQL queries (from within the API) ??
Thanks,
Toni

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Access to Security (User/Groups) via Java API
« Reply #1 on: August 10, 2013, 12:03:59 am »
I have never used the EAAPI.jar but would not know why it should be different from the standard API. Though I read quite a number of posts where people have difficulties using Java to code against EA which others (e.g. C# hackers) do not have.

q.

Toni Menzel

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: Access to Security (User/Groups) via Java API
« Reply #2 on: August 10, 2013, 12:08:53 am »
Thanks "qwerty".
Then maybe coming from there, what would a C# hacker do? Is there an API for security control ? (other than Repository.getIsSecurityEnabled:boolean)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Access to Security (User/Groups) via Java API
« Reply #3 on: August 10, 2013, 12:27:27 am »
Well, there's not so much available indeed. Geert has posted some hacks here how to circumvent that. And his add-in framework has some additional framework too. You should check that out. (Try a search for Geerts posts regarding "security"; use the search button top right; extend time to one year). Many of his hints are based on the security description found in my Inside book.

q.
« Last Edit: August 10, 2013, 12:29:20 am by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Access to Security (User/Groups) via Java API
« Reply #4 on: August 26, 2013, 04:48:55 pm »
Hi Tony,

Most of the security objects and functions haven't been exposed in the API (Java or C#), so the only workaround is to get the information using SQL, and if needed even update the database directly.
For queries you can use Repository.SQLQuery, for updates you'll need Repository.Execute

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Access to Security (User/Groups) via Java API
« Reply #5 on: August 26, 2013, 09:50:06 pm »
I've described the security tables in my Inside book.

q.