Ejemplo n.º 1
0
    /// <summary>
    /// Parse the Group to Tableau Role mappings from the XML
    /// </summary>
    /// <param name="xmlConfig"></param>
    /// <returns></returns>
    private List <SynchronizeGroupToRole> ParseGroupsToRoles(XmlDocument xmlConfig)
    {
        var listOut = new List <SynchronizeGroupToRole>();

        var xNodesGroupToRole = xmlConfig.SelectNodes("//SynchronizeConfiguration/SynchronizeRoles/SynchronizeRole");

        foreach (XmlNode thisXmlNode in xNodesGroupToRole)
        {
            var thisMapping = new SynchronizeGroupToRole(thisXmlNode);
            listOut.Add(thisMapping);
        }

        return(listOut);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// Parse the Group to Tableau Role mappings from the XML
    /// </summary>
    /// <param name="xmlConfig"></param>
    /// <returns></returns>
    private List <SynchronizeGroupToRole> ParseGroupsToRoles(XmlDocument xmlConfig)
    {
        var listOut = new List <SynchronizeGroupToRole>();

        var xNodesGroupToRole = xmlConfig.SelectNodes("//SynchronizeConfiguration/SynchronizeRoles/SynchronizeRole");

        foreach (XmlNode thisXmlNode in xNodesGroupToRole)
        {
            var groupName       = thisXmlNode.Attributes["sourceGroup"].Value;
            var tableauRoleName = thisXmlNode.Attributes["targetRole"].Value;
            var authModel       = thisXmlNode.Attributes["auth"].Value;

            var thisMapping = new SynchronizeGroupToRole(groupName, tableauRoleName, authModel);
            listOut.Add(thisMapping);
        }

        return(listOut);
    }