Esempio n. 1
0
        /// <summary>
        /// Generate User Mappings based on the Clearquest users
        /// Each User mapping generates the same user name in to section also
        /// </summary>
        private void GenerateDefaultUserMaps(string userMapFileName)
        {
            Logger.WritePerf(LogSource.CQ, "Generating Default User Map");
            AdminSession cqAdminSess = m_cqConnection.GetAdminSession();
            OAdUsers     users       = CQWrapper.GetUsers(cqAdminSess);
            // create a instance of usermap.xml file
            UserMappings userMaps = new UserMappings(userMapFileName);

            for (int userindx = 0; userindx < users.Count; userindx++)
            {
                object  userObj = (object)userindx;
                OAdUser aUser   = CQWrapper.GetUser(users, ref userObj);
                userMaps.Add(aUser.Name, aUser.Name);
            }
            userMaps.Flush();
            Logger.WritePerf(LogSource.CQ, "Default User Map Generation Done");
        } // end of GenerateDefaultUserMaps()