Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Roberto_il_vecchio on May 18, 2015, 07:53:05 pm

Title: How to get permission by a C# extension?
Post by: Roberto_il_vecchio on May 18, 2015, 07:53:05 pm
Hello, I've created a tagged value for an kind of element, and a C# form to handle this element. (by doublecliking on the element EA fires EA_OnContextItemDoubleClicked and so on....)
But not all the users could be that: only the one with the "Update Element" permission.
So I create some users, different groups with different permissions.
I get the User for Repository.GetCurrentLoginUser, the group from the table t_secusergroup, the  permission of the group from t_secgrouppermission, but here the permission is in "Numeric code" .
I suppose that the "name" should be in t_secpermission (the columns are: code and description) But this table seems to be empty.
And where are the lables of the "code" as I can see in the menu where I set the permission of a group?
(http://Libraries\Pictures\image_Permission.png)

Thanks
Roberto
Title: Re: How to get permission by a C# extension?
Post by: Geert Bellekens on May 18, 2015, 09:00:20 pm
Roberto,

I don't think EA stores the description of the different permissions.
So you will probably have to figure out which permission ID corresponds to the permission you are interested in.

Seems like t_secpermission is not used.

Geert
Title: Re: How to get permission by a C# extension?
Post by: qwerty on May 18, 2015, 09:31:26 pm
Permission ID:
35:Admin Workflow
5: Administer Database
30: Audit Settings ...
27: View Locks

(from my Inside book p. 22)

q.