Telerik Security classes?

Posted by Community Admin on 05-Aug-2018 10:00

Telerik Security classes?

All Replies

Posted by Community Admin on 17-Dec-2010 00:00

Hi,

In sitefinity 3.7 I was using the following:

HttpContext.Current.User.IsInRole("administrators")  (This will work in sf4 but I know there was a telerik.secrity version of this too.....)
string[] arrRoles = arrRoles.GetRolesForUser(HttpContext.Current.User.Identity.Name);

What is the equivlent in Sitefinity 4?

Thanks,
Chris

Posted by Community Admin on 17-Dec-2010 00:00

Hello Chris,

You can try using RoleManager and  SecurityManger classes.

var roleManager = RoleManager.GetManager();
var rolesForUser = roleManager.GetRolesForUser(SecurityManager.GetCurrentUserId());

Regards,
Ivan Dimitrov
the Telerik team


Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Posted by Community Admin on 17-Dec-2010 00:00

Sweet thanks

This thread is closed