Пример #1
0
    private void ReloadData()
    {
        if (node != null)
        {
            if (node.IsRoot())
            {
                // Hide inheritance options for root node
                pnlInherits.Visible = false;
            }
            else
            {
                inheritElem.Value = node.NodeWireframeInheritPageLevels;
            }

            var currentUser = MembershipContext.AuthenticatedUser;

            // Check read permissions
            if (currentUser.IsAuthorizedPerDocument(node, NodePermissionsEnum.Read) == AuthorizationResultEnum.Denied)
            {
                RedirectToAccessDenied(String.Format(GetString("cmsdesk.notauthorizedtoreaddocument"), node.NodeAliasPath));
            }
            // Check modify permissions
            else if (!currentUser.IsAuthorizedPerResource("CMS.Design", "Wireframing") || (currentUser.IsAuthorizedPerDocument(node, NodePermissionsEnum.Modify) == AuthorizationResultEnum.Denied))
            {
                hasModifyPermission = false;
                txtComment.Enabled  = false;
                EditMenu.Enabled    = false;
            }

            txtComment.Text = node.GetStringValue("NodeWireframeComment", "");
        }
    }