Book a Demo

Author Topic: User Group Account Request  (Read 3536 times)

EA2412

  • EA User
  • **
  • Posts: 66
  • Karma: +0/-0
    • View Profile
User Group Account Request
« on: May 18, 2010, 08:45:03 pm »
Hi all

is there any possibility to read back the assigned user group for the currently logged on user via c#?

Thanks in advance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: User Group Account Request
« Reply #1 on: May 18, 2010, 09:17:12 pm »
I don't see an operation to get it directly, but you can use Repository.SQLQuery to get the name of the group.

Geert

EA2412

  • EA User
  • **
  • Posts: 66
  • Karma: +0/-0
    • View Profile
Re: User Group Account Request
« Reply #2 on: May 18, 2010, 09:18:46 pm »
Hi Geert

thanks for your reply. Is it possible that you can provide any code fragment to me?

Thanks in advance

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: User Group Account Request
« Reply #3 on: May 18, 2010, 09:46:00 pm »
Use following query in the Repository.SQLQuery.
That will return an xml formatted string with the resultset of that query.
Code: [Select]
select groupname from ((t_secgroup g
join t_secusergroup ug on ug.GroupID = g.GroupID)
join t_secuser u on ug.UserID = u.UserID)
where u.UserLogin = 'Geert'

Geert