Telerik Security classes? - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Telerik Security classes?

  • Telerik Security classes?
  • 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
  • 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.
  • Sweet thanks