Author Topic: Search Diagrams and Elements by UserID  (Read 196 times)

i4mdone

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Search Diagrams and Elements by UserID
« on: October 16, 2018, 07:58:06 am »
I ultimately want a search that will find Diagrams and Elements that are owned by Users belonging to a particular Group (Security Group).

I can piece things together with the t_object.Author property; Is this the only route or is there a more thoughtful/efficient method?

qwerty

  • EA Guru
  • *****
  • Posts: 9751
  • Karma: +178/-152
  • I'm no guru at all
    • View Profile
Re: Search Diagrams and Elements by UserID
« Reply #1 on: October 16, 2018, 09:46:53 am »
You can join that with t_secgroup and t_secusergroup in order to relate security user and group.

q.

i4mdone

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Search Diagrams and Elements by UserID
« Reply #2 on: October 16, 2018, 11:11:15 am »
Thank you. The trouble that I am encountering is relating a Diagram or Object to t_secuser table so that I can get the UserID which then I can related to the GroupID. The following works, but the first line I am using String concatenation which seems a bit hackish...but maybe that's the only way.

t_diagram.Author = t_secuser.FirstName + ' ' + t_secuser.Surname AND
t_secuser.UserID = t_secusergroup.UserID AND
t_secusergroup.GroupID = t_secgroup.GroupID AND
t_secgroup.GroupName = '<Search Term>'

qwerty

  • EA Guru
  • *****
  • Posts: 9751
  • Karma: +178/-152
  • I'm no guru at all
    • View Profile
Re: Search Diagrams and Elements by UserID
« Reply #3 on: October 16, 2018, 06:25:00 pm »
Yes, I guess that's the way to do. More than once I thought by myself that the inventor of EA's data model should be clubbed to death - with a teaspoon so it takes longer :-/

q.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6467
  • Karma: +56/-6
    • View Profile
Re: Search Diagrams and Elements by UserID
« Reply #4 on: October 17, 2018, 10:29:22 am »
The author field matching a security user name like that is almost coincidental.

I'm not sure doing that linkage is really want you want. Author is the person who originally created it. Ownership might be that there is a security lock on it. (Either at the group or user level)
Simon

support@sparxsystems.com

i4mdone

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Search Diagrams and Elements by UserID
« Reply #5 on: October 17, 2018, 11:30:14 pm »
Good point. A couple of questions then -

1. It appears Author reflects the original object creator, but the specific User that represents the Author is a bit ambiguous and, as you pointed to, could be almost coincidental.  So the question is how can you  determine the specific "unambiguous" original object creator? Is there a way to determine the UserID for the original object creator?

2. I like the thought around security locks (t_seclocks ... ) - once an object lock has been released, is it possible to determine which User last locked an object (through Query - not Audit)?


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8527
  • Karma: +208/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Search Diagrams and Elements by UserID
« Reply #6 on: October 17, 2018, 11:35:41 pm »
I think for both points you would need the Audit feature.


Geert

i4mdone

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Search Diagrams and Elements by UserID
« Reply #7 on: October 18, 2018, 01:53:57 am »
Is there another way to approach this then?

I have a multi-team modeling environment. The specific Goal is to create a set of Model Views pertinent to each modeling team - filtering out "noise" from other teams activities and only showing what is relevant to their particular team.

I can see this and other scenarios regarding a multi-team modeling environment being highly desirable in an enterprise setting.