SaaS CMS has officially launched! Learn more now.

Get RolePermission data


[Working on Episerver version 10]

I am working on a Gadget for our system administrators that will show given role x, which permissions that role has.  The string to be translated to fetch the access permission is located in the dbo.RolePermission table in Epi Commerce database.

What is the best way to retireve the data from this table in code?

May 17, 2019 22:04

It is a CMS question, really.

You can use PermissionTypeRepository to get the registered PermissionTypes, then PermissionRepository to figure out which groups/users have a specific permission 

May 17, 2019 23:20

Quan Mai,

are their any code examples of this? i am having trouble finding them

May 17, 2019 23:32

Quan Mai,

i believe I am looking for the inverse.

I want the input to be a group, like "Administrator" then, i want the gadget to list all of the permissions for that group.

Not sure the above suggestion will work because you send it a permissions type and it returns a list of users/groups that have that specific permission. 

May 17, 2019 23:40

You can write some code to reverse that as you already have a list of permission types and the users/groups attached to them. 

Here's a hint 

May 18, 2019 23:17

This can be closed.

Thanks for your help Quan Mai!

May 22, 2019 19:58

Just a small note: this is the public community forum so if you find a post answers your question, you can click on "Accept this answer" (you can also figure out the answer yourself, post it here and accept it). You can also vote up a good post (or vote down a vote that you think could be better). That way we build a better community for all.

May 22, 2019 20:33
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.