Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: adepreter on April 21, 2016, 06:48:32 pm
-
Is there a way to create, by script, a dictionary object that contains the Security groups that the current user belongs to?
Cheers,
Alain
-
Sort of. You can query the tables t_secuser, t_secgroup, t_secusergroup and t_secgrouppermission to get the information you need.
q.
-
There's not really an API object for security users or groups, but you can certainly get the info from the database using Repository.SQLQuery
You can use Repository.GetCurrentLoginUser (boolean GetGuid) to get the current user and use that to select the groups
select g.GroupName from t_secusergroup ug
inner join t_secgroup g on g.GroupID = ug.GroupID
where ug.UserID = '<userGUID>'
Geert
-
Thank you. Very good idea.