Migration K7 to K8

Tomasz Czado asked on June 30, 2017 17:09

What is an equivalent of CMS.CMSHelper.CMSContext.CurrentUser.IsEditor in Kentico 8?

Correct Answer

Brenden Kehren answered on June 30, 2017 17:30

Something like this would work:

CMS.Membership.UserPrivilegeLevelEnum level = CMS.Membership.MembershipContext.AuthenticatedUser.GetPrivilegeLevel();
if (level == CMS.Membership.UserPrivilegeLevelEnum.Editor)
    // do your work here
2 votesVote for this answer Unmark Correct answer

Recent Answers

Tomasz Czado answered on June 30, 2017 17:41

I've already found it but thank you for quick reply :)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.