Example #1
0
        private void InitData()
        {
            IList <RoleNodePermissionsInfo> roleNodePermissionsList = new List <RoleNodePermissionsInfo>();

            roleNodePermissionsList = RolePermissions.GetNodePermissionsById(this.m_RoleId, -2);
            this.SetContentNodeAll(roleNodePermissionsList);
            this.SetContentNode(roleNodePermissionsList);
            this.SetNodeAll(roleNodePermissionsList);
            this.SetNode(roleNodePermissionsList);
            this.SetNodeCommentAll(roleNodePermissionsList);
            this.SetNodeComment(roleNodePermissionsList);
        }
Example #2
0
        private void InitData()
        {
            IList <RoleNodePermissionsInfo> roleNodePermissionsList = new List <RoleNodePermissionsInfo>();
            string permissionsType = this.m_PermissionsType;

            if (permissionsType != null)
            {
                if (!(permissionsType == "Role"))
                {
                    if (permissionsType == "User")
                    {
                        string str3;
                        roleNodePermissionsList = UserPermissions.GetNodePermissionsById(this.m_RoleId, -2, this.m_IdType);
                        if (((str3 = this.m_Type) != null) && (str3 == "Content"))
                        {
                            this.EgvNodes.Columns[2].Visible = true;
                            this.EgvNodes.Columns[3].Visible = true;
                            this.EgvNodes.Columns[4].Visible = true;
                            this.SetUserContentNodeAll(roleNodePermissionsList);
                            this.SetUserContentNode(roleNodePermissionsList);
                        }
                    }
                }
                else
                {
                    roleNodePermissionsList = RolePermissions.GetNodePermissionsById(this.m_RoleId, -2);
                    string type = this.m_Type;
                    if (type != null)
                    {
                        if (!(type == "Content"))
                        {
                            if (!(type == "Node"))
                            {
                                if (type == "Comment")
                                {
                                    this.EgvNodes.Columns[9].Visible  = true;
                                    this.EgvNodes.Columns[10].Visible = true;
                                    this.EgvNodes.Columns[11].Visible = true;
                                    this.SetNodeCommentAll(roleNodePermissionsList);
                                    this.SetNodeComment(roleNodePermissionsList);
                                }
                                return;
                            }
                        }
                        else
                        {
                            this.EgvNodes.Columns[3].Visible = true;
                            this.EgvNodes.Columns[4].Visible = true;
                            this.EgvNodes.Columns[5].Visible = true;
                            this.EgvNodes.Columns[6].Visible = true;
                            this.SetContentNodeAll(roleNodePermissionsList);
                            this.SetContentNode(roleNodePermissionsList);
                            return;
                        }
                        this.EgvNodes.Columns[7].Visible = true;
                        this.EgvNodes.Columns[8].Visible = true;
                        this.SetNodeAll(roleNodePermissionsList);
                        this.SetNode(roleNodePermissionsList);
                    }
                }
            }
        }