HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/RMourik/bassol.nl/wwwroot/CMSModules/Content/CMSDesk/MasterPage/PageEdit.aspx.cs
using System;

using CMS.Helpers;
using CMS.UIControls;
using CMS.Membership;

public partial class CMSModules_Content_CMSDesk_MasterPage_PageEdit : CMSContentPage
{
    #region "Variables"

    private CurrentUserInfo mUser;

    #endregion


    #region "Methods"

    protected override void CreateChildControls()
    {
        // Enable split mode
        EnableSplitMode = true;

        mUser = MembershipContext.AuthenticatedUser;
        if (Node != null)
        {
            UIContext.EditedObject = Node;
            ucHierarchy.PreviewObjectName = Node.NodeAliasPath;
            ucHierarchy.AddContentParameter(new UILayoutValue("PreviewObject", Node));
            ucHierarchy.DefaultAliasPath = Node.NodeAliasPath;
            ucHierarchy.IgnoreSessionValues = true;
        }

        base.CreateChildControls();
    }

    protected override void OnInit(EventArgs e)
    {
        // Check UIProfile
        if (!mUser.IsAuthorizedPerUIElement("CMS.Design", "MasterPage"))
        {
            RedirectToUIElementAccessDenied("CMS.Design", "MasterPage");
        }

        // Check "Design" permission
        if (!mUser.IsAuthorizedPerResource("CMS.Design", "Design"))
        {
            RedirectToAccessDenied("CMS.Design", "Design");
        }

        ucHierarchy.RegisterEnvelopeClientID();
        base.OnInit(e);

        UIHelper.SetBreadcrumbsSuffix(GetString("content.ui.page"));
    }

    #endregion
}