public void Can_Export_UserGroupPermissions()
        {
            IEnumerable <UserGroupPermissionsExport> userGroupPermissions = _repo.ExportUserGroupPermissions();

            Assert.Empty(userGroupPermissions);

            Scaffold.Config();

            userGroupPermissions = _repo.ExportUserGroupPermissions();
            Assert.NotEmpty(userGroupPermissions);
        }
示例#2
0
        /// <summary>
        /// Export all workflow configuration. This is a simple representation of the current workflow database tables.
        /// </summary>
        /// <returns></returns>
        public Task <ImportExportModel> Export()
        {
            var model = new ImportExportModel
            {
                Settings             = _repo.ExportSettings(),
                UserGroups           = _repo.ExportUserGroups(),
                User2UserGroup       = _repo.ExportUser2UserGroups(),
                UserGroupPermissions = _repo.ExportUserGroupPermissions()
            };

            return(Task.FromResult(model));
        }
示例#3
0
        /// <summary>
        /// Export all workflow configuration. This is a simple representation of the current workflow database tables.
        /// </summary>
        /// <returns></returns>
        public Task <ImportExportModel> Export()
        {
            var model = new ImportExportModel();

            try
            {
                model.Settings             = _repo.ExportSettings();
                model.UserGroups           = _repo.ExportUserGroups();
                model.User2UserGroup       = _repo.ExportUser2UserGroups();
                model.UserGroupPermissions = _repo.ExportUserGroupPermissions();
            }
            catch (Exception e)
            {
                _log.Error(GetType(), e.Message, e);
            }

            return(Task.FromResult(model));
        }