Book a Demo

Author Topic: How to get permission by a C# extension?  (Read 3066 times)

Roberto_il_vecchio

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
How to get permission by a C# extension?
« 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?


Thanks
Roberto

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to get permission by a C# extension?
« Reply #1 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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to get permission by a C# extension?
« Reply #2 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.