コード例 #1
0
ファイル: Migration.cs プロジェクト: BEXIS2/Core
        public void UserMigration()
        {
            // data base of bexis1 user query
            string filePath = AppConfiguration.GetModuleWorkspacePath("BMM");
            // names of the features witch set to the group "bexisUser"
            string[] featureNames = { "Search", "Data Collection", "Research Plan", "Data Dissemination" };

            UserMigration userMigration = new UserMigration();

            // create or get a group named "bexisUser"
            long groupId = userMigration.bexisUserGroup();

            // set feature permission of the group "bexisUser"
            userMigration.SetFeaturePermissions(groupId, featureNames);

            // query bexis1 user from provider.users and generate a random password
            List<UserProperties> BExISUsers = userMigration.GetFromBExIS(DataBase);

            // transfer users to bpp; not all user data are provided in bpp
            // save usernames and passwords in file "passwords.txt"
            userMigration.CreateOnBPP(BExISUsers, filePath, groupId);
        }