+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / Telerik Security classes?

Telerik Security classes?

3 posts, 0 answered
  1. TIOS
    TIOS avatar
    48 posts
    Registered:
    22 Mar 2006
    17 Dec 2010
    Link to this post
    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
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    17 Dec 2010
    Link to this post
    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.
  3. TIOS
    TIOS avatar
    48 posts
    Registered:
    22 Mar 2006
    17 Dec 2010
    Link to this post
    Sweet thanks
3 posts, 0 answered