Esempio n. 1
0
 public static TM_UserData ReloadData(this TM_UserData userData)
 {
     userData.SetUp();
     userData.loadTmUserData();
     userData.createDefaultAdminUser();  // make sure the admin user exists and is configured
     return(userData);
 }
Esempio n. 2
0
 public static bool setUserDataPath(this TM_UserData userData, string userDataPath)
 {
     if (userDataPath.dirExists().isFalse())
     {
         "[TM_UserData][setUserDataPath] provided userDataPath didn't exist: {0}".error("userDataPath");
         return(false);
     }
     try
     {
         userData.Path_UserData = userDataPath;
         userData.ResetData();
         userData.SetUp();
         userData.loadTmUserData();
         return(true);
     }
     catch (Exception ex)
     {
         ex.log("[TM_UserData][setUserDataPath]");
         return(false);
     }
 }
Esempio n. 3
0
        public void setUp()
        {
            //create temp repo with no Admin user
            userData = new TM_UserData(true)
                                {
                                    Path_UserData = "nonGitRepo".tempDir()
                                };
            userData .SetUp(false);
            nGit     = userData.NGit;

            Assert.AreEqual(1, nGit.commits().size() , "there should be one commit of the TMSecretData.config file");
        }
Esempio n. 4
0
        public void setUp()
        {
            //create temp repo with no Admin user
            userData = new TM_UserData(true)
                                {
                                    Path_UserData = "nonGitRepo".tempDir()
                                };
            userData .SetUp();
            nGit     = userData.NGit;

            Assert.AreEqual(2, nGit.commits().size() , "there should be two commits here");
        }