More in this section
Forums / Sitefinity SDK / Telerik Security classes?

Telerik Security classes?

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
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:
    12 Sep 2017
    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