How to create permissions for News, Events, Content Blocks a

Posted by Kaibear on 31-Jan-2020 09:55

I am trying to assign permissions for the News, Events and Content Blocks and A/B Testing module to a role.

Whoever, I am not able to find the SetName as in other modules (like Blogs via BlogsPermissions or like in Tags via SecurityConstants.Sets.Taxonomies.SetName).

In addition I cannot find the opportunity to actually assign the Create or View permissions.

How can I access this for "GrantActions(...)"?

All Replies

Posted by jread on 31-Jan-2020 18:13

The Permission set names can be retrieved from Telerik.Sitefinity.Security.SecurityConstants.Set.{NAME}.SetName (for whichever you are applying). See below SecurityConstants.Album.View

Example for adding view permissions for a user, should be able to adapt easily to other types.

Posted by Kaibear on 01-Feb-2020 21:42

Hi Jonathan,

yes, that does work for Album and others (excluding Blogspermissions, Lists and Forms for example - which do have their own Permissions-Class to get that from).

However, the Events, News, AB-Testing and also Content Blocks are neither listed under the securityconstants nor do they have their own permissions classes. That's how I come up with the question how these are handled.

This thread is closed