public static void NewSecurityStrategyComplex(this XafApplication application, Type authethicationType = null, Type logonParametersType = null, Type userType = null, Type roleType = null)
        {
            logonParametersType = logonParametersType ?? typeof(XpandLogonParameters);
            userType            = userType ?? typeof(XpandUser);
            AuthenticationStandard authenticationStandard = new XpandAuthenticationStandard(userType, logonParametersType);

            if (authethicationType != null)
            {
                authenticationStandard                     = (AuthenticationStandard)authethicationType.CreateInstance();
                authenticationStandard.UserType            = userType;
                authenticationStandard.LogonParametersType = logonParametersType;
            }
            var security = new SecurityStrategyComplex(userType, roleType ?? typeof(XpandRole), authenticationStandard);

            application.Security = security;
        }
Beispiel #2
0
        private static void NewSecurityStrategyComplexCore(XafApplication application, Type authethicationType,
                                                           Type logonParametersType, Type userType, Type roleType, Type defaultUserType, Type defaultRoleType)
        {
            logonParametersType ??= typeof(XpandLogonParameters);
            userType ??= defaultUserType;
            AuthenticationStandard authenticationStandard = new XpandAuthenticationStandard(userType, logonParametersType);

            if (authethicationType != null)
            {
                authenticationStandard                     = (AuthenticationStandard)authethicationType.CreateInstance();
                authenticationStandard.UserType            = userType;
                authenticationStandard.LogonParametersType = logonParametersType;
            }
            var security = new SecurityStrategyComplex(userType, roleType ?? defaultRoleType, authenticationStandard);

            application.Security = security;
        }
Beispiel #3
0
        private void InitializeComponent()
        {
            _module1                         = new SystemModule();
            _module2                         = new SystemAspNetModule();
            _module5                         = new ValidationModule();
            _module6                         = new BusinessClassLibraryCustomizationModule();
            _securityModule1                 = new SecurityModule();
            _sqlConnection1                  = new SqlConnection();
            _securityComplex1                = new SecurityStrategyComplex();
            _authenticationStandard1         = new XpandAuthenticationStandard();
            _featureCenterModule1            = new FeatureCenterModule();
            _cloneObjectModule1              = new CloneObjectModule();
            _viewVariantsModule1             = new ViewVariantsModule();
            _pivotChartModuleBase1           = new PivotChartModuleBase();
            _scriptRecorderModuleBase1       = new ScriptRecorderModuleBase();
            _featureCenterAspNetModule1      = new FeatureCenterAspNetModule();
            _pivotChartAspNetModule1         = new PivotChartAspNetModule();
            _fileAttachmentsAspNetModule1    = new FileAttachmentsAspNetModule();
            _conditionalAppearanceModule1    = new ConditionalAppearanceModule();
            _kpiModule1                      = new KpiModule();
            _workflowModule1                 = new WorkflowModule();
            _htmlPropertyEditorAspNetModule1 = new HtmlPropertyEditorAspNetModule();
            _treeListEditorsAspNetModule1    = new TreeListEditorsAspNetModule();
            _schedulerModuleBase1            = new SchedulerModuleBase();
            _schedulerAspNetModule1          = new SchedulerAspNetModule();
            _stateMachineModule1             = new StateMachineModule();
            _treeListEditorsModuleBase2      = new TreeListEditorsModuleBase();
            ((ISupportInitialize)this).BeginInit();
            //
            // module5
            //
            _module5.AllowValidationDetailsAccess     = true;
            _module5.IgnoreWarningAndInformationRules = false;
            //
            // securityModule1
            //
            _securityModule1.UserType = typeof(SecuritySystemUser);
            //
            // sqlConnection1
            //
            _sqlConnection1.ConnectionString =
                "Data Source=(local);Initial Catalog=XpandFeatureCenter;Integrated Security=SSPI;P" +
                "ooling=false";
            _sqlConnection1.FireInfoMessageEventOnUserErrors = false;
            //
            // securityComplex1
            //
            _securityComplex1.Authentication = _authenticationStandard1;
            _securityComplex1.RoleType       = typeof(XpandRole);
            _securityComplex1.UserType       = typeof(SecuritySystemUser);
            //
            // authenticationStandard1
            //
            _authenticationStandard1.LogonParametersType = typeof(XpandLogonParameters);
            //
            // viewVariantsModule1
            //
            _viewVariantsModule1.FrameVariantsEngine = null;
            _viewVariantsModule1.VariantsProvider    = null;
            //
            // pivotChartModuleBase1
            //
            _pivotChartModuleBase1.ShowAdditionalNavigation = false;
            //
            // workflowModule1
            //
            _workflowModule1.RunningWorkflowInstanceInfoType   = typeof(XpoRunningWorkflowInstanceInfo);
            _workflowModule1.StartWorkflowRequestType          = typeof(XpoStartWorkflowRequest);
            _workflowModule1.UserActivityVersionType           = typeof(XpoUserActivityVersion);
            _workflowModule1.WorkflowControlCommandRequestType = typeof(XpoWorkflowInstanceControlCommandRequest);
            _workflowModule1.WorkflowDefinitionType            = typeof(XpoWorkflowDefinition);
            _workflowModule1.WorkflowInstanceKeyType           = typeof(XpoInstanceKey);
            _workflowModule1.WorkflowInstanceType = typeof(XpoWorkflowInstance);
            //
            // reportsModule1
            //

            //
            // stateMachineModule1
            //
            _stateMachineModule1.StateMachineStorageType = typeof(XpoStateMachine);
            //
            // FeatureCenterAspNetApplication
            //
            ApplicationName = "FeatureCenter";
            Connection      = _sqlConnection1;
            Modules.Add(_module1);
            Modules.Add(_module2);
            Modules.Add(_module5);
            Modules.Add(_module6);
            Modules.Add(_securityModule1);
            Modules.Add(_cloneObjectModule1);
            Modules.Add(_viewVariantsModule1);
            Modules.Add(_conditionalAppearanceModule1);
            Modules.Add(_pivotChartModuleBase1);
            Modules.Add(_scriptRecorderModuleBase1);
            Modules.Add(_kpiModule1);
            Modules.Add(_workflowModule1);
            Modules.Add(_stateMachineModule1);
            Modules.Add(_featureCenterModule1);
            Modules.Add(_pivotChartAspNetModule1);
            Modules.Add(_fileAttachmentsAspNetModule1);
            Modules.Add(_htmlPropertyEditorAspNetModule1);

            Modules.Add(_treeListEditorsModuleBase2);
            Modules.Add(_treeListEditorsAspNetModule1);
            Modules.Add(_schedulerModuleBase1);
            Modules.Add(_schedulerAspNetModule1);
            Modules.Add(_featureCenterAspNetModule1);
            Security = _securityComplex1;
            DatabaseVersionMismatch += AspNetApplicationDatabaseVersionMismatch;
            ((ISupportInitialize)this).EndInit();
        }
Beispiel #4
0
        private void InitializeComponent()
        {
            this.module1                 = new DevExpress.ExpressApp.SystemModule.SystemModule();
            this.module2                 = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
            this.module5                 = new DevExpress.ExpressApp.Validation.ValidationModule();
            this.module6                 = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
            this.securityModule1         = new DevExpress.ExpressApp.Security.SecurityModule();
            this.sqlConnection1          = new System.Data.SqlClient.SqlConnection();
            this.securityComplex1        = new DevExpress.ExpressApp.Security.SecurityComplex();
            this.authenticationStandard1 = new XpandAuthenticationStandard();
            this.featureCenterModule1    = new FeatureCenter.Module.FeatureCenterModule();
            this.cloneObjectModule1      = new DevExpress.ExpressApp.CloneObject.CloneObjectModule();

            this.viewVariantsModule1               = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
            this.xpandSystemModule1                = new Xpand.ExpressApp.SystemModule.XpandSystemModule();
            this.logicModule1                      = new Xpand.ExpressApp.Logic.LogicModule();
            this.xpandValidationModule1            = new Xpand.ExpressApp.Validation.XpandValidationModule();
            this.conditionalControllerStateModule1 = new Xpand.ExpressApp.ConditionalControllerState.ConditionalControllerStateModule();
            this.conditionalActionStateModule1     = new Xpand.ExpressApp.ConditionalActionState.ConditionalActionStateModule();
            this.modelArtifactStateModule1         = new Xpand.ExpressApp.ModelArtifactState.ModelArtifactStateModule();
            this.modelDifferenceModule1            = new Xpand.ExpressApp.ModelDifference.ModelDifferenceModule();
            this.xpandSecurityModule1              = new Xpand.ExpressApp.Security.XpandSecurityModule();
            this.xpandViewVariantsModule1          = new Xpand.ExpressApp.ViewVariants.XpandViewVariantsModule();
            this.worldCreatorModule1               = new Xpand.ExpressApp.WorldCreator.WorldCreatorModule();
            this.treeListEditorsModuleBase1        = new DevExpress.ExpressApp.TreeListEditors.TreeListEditorsModuleBase();
            this.ioModule1 = new Xpand.ExpressApp.IO.IOModule();

            this.pivotChartModuleBase1  = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
            this.xpandPivotChartModule1 = new Xpand.ExpressApp.PivotChart.XpandPivotChartModule();
            this.filterDataStoreModule1 = new Xpand.ExpressApp.FilterDataStore.FilterDataStoreModule();

            this.scriptRecorderModuleBase1    = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
            this.conditionalDetailViewModule1 = new Xpand.ExpressApp.ConditionalDetailViews.ConditionalDetailViewModule();
            this.memberLevelSecurityModule1   = new Xpand.ExpressApp.MemberLevelSecurity.MemberLevelSecurityModule();
            this.featureCenterAspNetModule1   = new FeatureCenter.Module.Web.FeatureCenterAspNetModule();

            this.exceptionHandlingWebModule1 = new Xpand.ExpressApp.ExceptionHandling.Web.ExceptionHandlingWebModule();

            this.pivotChartAspNetModule1      = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
            this.xpandPivotChartAspNetModule1 = new Xpand.ExpressApp.PivotChart.Web.XpandPivotChartAspNetModule();
            this.thumbnailWebModule1          = new Xpand.ExpressApp.Thumbnail.Web.ThumbnailWebModule();
            this.nCarouselWebModule1          = new Xpand.ExpressApp.NCarousel.Web.NCarouselWebModule();
            this.xpandSystemAspNetModule1     = new Xpand.ExpressApp.Web.SystemModule.XpandSystemAspNetModule();
            this.fileAttachmentsAspNetModule1 = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();

            this.worldCreatorWebModule1 = new Xpand.ExpressApp.WorldCreator.Web.WorldCreatorWebModule();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            //
            // module5
            //
            this.module5.AllowValidationDetailsAccess = true;
            //
            // sqlConnection1
            //
            this.sqlConnection1.ConnectionString = "Data Source=(local);Initial Catalog=XpandFeatureCenter;Integrated Security=SSPI;P" +
                                                   "ooling=false";
            this.sqlConnection1.FireInfoMessageEventOnUserErrors = false;
            //
            // securityComplex1
            //
            this.securityComplex1.Authentication = this.authenticationStandard1;
            this.securityComplex1.RoleType       = typeof(DevExpress.Persistent.BaseImpl.Role);
            this.securityComplex1.UserType       = typeof(DevExpress.Persistent.BaseImpl.User);
            //
            // authenticationStandard1
            //

            //
            // viewVariantsModule1
            //
            this.viewVariantsModule1.GenerateVariantsNode     = true;
            this.viewVariantsModule1.ShowAdditionalNavigation = false;
            //
            // pivotChartModuleBase1
            //
            this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
            //
            // FeatureCenterAspNetApplication
            //
            this.ApplicationName = "FeatureCenter";
            this.Connection      = this.sqlConnection1;
            this.Modules.Add(this.module1);
            this.Modules.Add(this.module2);
            this.Modules.Add(this.module5);
            this.Modules.Add(this.module6);
            this.Modules.Add(this.securityModule1);
            this.Modules.Add(this.cloneObjectModule1);

            this.Modules.Add(this.viewVariantsModule1);
            this.Modules.Add(this.xpandSystemModule1);
            this.Modules.Add(this.logicModule1);
            this.Modules.Add(this.xpandValidationModule1);
            this.Modules.Add(this.conditionalControllerStateModule1);
            this.Modules.Add(this.conditionalActionStateModule1);
            this.Modules.Add(this.modelArtifactStateModule1);
            this.Modules.Add(this.modelDifferenceModule1);
            this.Modules.Add(this.xpandSecurityModule1);
            this.Modules.Add(this.xpandViewVariantsModule1);
            this.Modules.Add(this.worldCreatorModule1);
            this.Modules.Add(this.treeListEditorsModuleBase1);
            this.Modules.Add(this.ioModule1);

            this.Modules.Add(this.pivotChartModuleBase1);
            this.Modules.Add(this.xpandPivotChartModule1);
            this.Modules.Add(this.filterDataStoreModule1);

            this.Modules.Add(this.scriptRecorderModuleBase1);
            this.Modules.Add(this.conditionalDetailViewModule1);
            this.Modules.Add(this.memberLevelSecurityModule1);
            this.Modules.Add(this.featureCenterModule1);

            this.Modules.Add(this.exceptionHandlingWebModule1);

            this.Modules.Add(this.pivotChartAspNetModule1);
            this.Modules.Add(this.xpandPivotChartAspNetModule1);
            this.Modules.Add(this.thumbnailWebModule1);
            this.Modules.Add(this.nCarouselWebModule1);
            this.Modules.Add(this.xpandSystemAspNetModule1);
            this.Modules.Add(this.fileAttachmentsAspNetModule1);

            this.Modules.Add(this.worldCreatorWebModule1);
            this.Modules.Add(this.featureCenterAspNetModule1);
            this.Security = this.securityComplex1;
            this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.AspNetApplicationDatabaseVersionMismatch);
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
        }
Beispiel #5
0
 private void InitializeComponent()
 {
     this._module1                        = new DevExpress.ExpressApp.SystemModule.SystemModule();
     this._module2                        = new DevExpress.ExpressApp.Web.SystemModule.SystemAspNetModule();
     this.module5                         = new DevExpress.ExpressApp.Validation.ValidationModule();
     this._module6                        = new DevExpress.ExpressApp.Objects.BusinessClassLibraryCustomizationModule();
     this._securityModule1                = new DevExpress.ExpressApp.Security.SecurityModule();
     this._sqlConnection1                 = new System.Data.SqlClient.SqlConnection();
     this._securityComplex1               = new DevExpress.ExpressApp.Security.SecurityStrategyComplex();
     this._authenticationStandard1        = new Xpand.ExpressApp.Security.AuthenticationProviders.XpandAuthenticationStandard();
     this._featureCenterModule1           = new FeatureCenter.Module.FeatureCenterModule();
     this._cloneObjectModule1             = new DevExpress.ExpressApp.CloneObject.CloneObjectModule();
     this._viewVariantsModule1            = new DevExpress.ExpressApp.ViewVariantsModule.ViewVariantsModule();
     this.pivotChartModuleBase1           = new DevExpress.ExpressApp.PivotChart.PivotChartModuleBase();
     this.scriptRecorderModuleBase1       = new DevExpress.ExpressApp.ScriptRecorder.ScriptRecorderModuleBase();
     this.featureCenterAspNetModule1      = new FeatureCenter.Module.Web.FeatureCenterAspNetModule();
     this.pivotChartAspNetModule1         = new DevExpress.ExpressApp.PivotChart.Web.PivotChartAspNetModule();
     this.fileAttachmentsAspNetModule1    = new DevExpress.ExpressApp.FileAttachments.Web.FileAttachmentsAspNetModule();
     this.conditionalAppearanceModule1    = new DevExpress.ExpressApp.ConditionalAppearance.ConditionalAppearanceModule();
     this.kpiModule1                      = new DevExpress.ExpressApp.Kpi.KpiModule();
     this.workflowModule1                 = new DevExpress.ExpressApp.Workflow.WorkflowModule();
     this.htmlPropertyEditorAspNetModule1 = new DevExpress.ExpressApp.HtmlPropertyEditor.Web.HtmlPropertyEditorAspNetModule();
     this.reportsModule1                  = new DevExpress.ExpressApp.Reports.ReportsModule();
     this.reportsAspNetModule1            = new DevExpress.ExpressApp.Reports.Web.ReportsAspNetModule();
     this.treeListEditorsAspNetModule1    = new DevExpress.ExpressApp.TreeListEditors.Web.TreeListEditorsAspNetModule();
     this.schedulerModuleBase1            = new DevExpress.ExpressApp.Scheduler.SchedulerModuleBase();
     this.schedulerAspNetModule1          = new DevExpress.ExpressApp.Scheduler.Web.SchedulerAspNetModule();
     this.stateMachineModule1             = new DevExpress.ExpressApp.StateMachine.StateMachineModule();
     this.treeListEditorsModuleBase2      = new DevExpress.ExpressApp.TreeListEditors.TreeListEditorsModuleBase();
     ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
     //
     // module5
     //
     this.module5.AllowValidationDetailsAccess     = true;
     this.module5.IgnoreWarningAndInformationRules = false;
     //
     // securityModule1
     //
     this._securityModule1.UserType = typeof(DevExpress.ExpressApp.Security.Strategy.SecuritySystemUser);
     //
     // sqlConnection1
     //
     this._sqlConnection1.ConnectionString = "Data Source=(local);Initial Catalog=XpandFeatureCenter;Integrated Security=SSPI;P" +
                                             "ooling=false";
     this._sqlConnection1.FireInfoMessageEventOnUserErrors = false;
     //
     // securityComplex1
     //
     this._securityComplex1.Authentication = this._authenticationStandard1;
     this._securityComplex1.RoleType       = typeof(Xpand.ExpressApp.Security.Core.XpandRole);
     this._securityComplex1.UserType       = typeof(DevExpress.ExpressApp.Security.Strategy.SecuritySystemUser);
     //
     // authenticationStandard1
     //
     this._authenticationStandard1.LogonParametersType = typeof(XpandLogonParameters);
     //
     // viewVariantsModule1
     //
     this._viewVariantsModule1.FrameVariantsEngine = null;
     this._viewVariantsModule1.VariantsProvider    = null;
     //
     // pivotChartModuleBase1
     //
     this.pivotChartModuleBase1.ShowAdditionalNavigation = false;
     //
     // workflowModule1
     //
     this.workflowModule1.RunningWorkflowInstanceInfoType   = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoRunningWorkflowInstanceInfo);
     this.workflowModule1.StartWorkflowRequestType          = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoStartWorkflowRequest);
     this.workflowModule1.UserActivityVersionType           = typeof(DevExpress.ExpressApp.Workflow.Versioning.XpoUserActivityVersion);
     this.workflowModule1.WorkflowControlCommandRequestType = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoWorkflowInstanceControlCommandRequest);
     this.workflowModule1.WorkflowDefinitionType            = typeof(DevExpress.ExpressApp.Workflow.Xpo.XpoWorkflowDefinition);
     this.workflowModule1.WorkflowInstanceKeyType           = typeof(DevExpress.Workflow.Xpo.XpoInstanceKey);
     this.workflowModule1.WorkflowInstanceType = typeof(DevExpress.Workflow.Xpo.XpoWorkflowInstance);
     //
     // reportsModule1
     //
     this.reportsModule1.EnableInplaceReports = true;
     this.reportsModule1.ReportDataType       = typeof(DevExpress.Persistent.BaseImpl.ReportData);
     //
     // stateMachineModule1
     //
     this.stateMachineModule1.StateMachineStorageType = typeof(DevExpress.ExpressApp.StateMachine.Xpo.XpoStateMachine);
     //
     // FeatureCenterAspNetApplication
     //
     this.ApplicationName = "FeatureCenter";
     this.Connection      = this._sqlConnection1;
     this.Modules.Add(this._module1);
     this.Modules.Add(this._module2);
     this.Modules.Add(this.module5);
     this.Modules.Add(this._module6);
     this.Modules.Add(this._securityModule1);
     this.Modules.Add(this._cloneObjectModule1);
     this.Modules.Add(this._viewVariantsModule1);
     this.Modules.Add(this.conditionalAppearanceModule1);
     this.Modules.Add(this.pivotChartModuleBase1);
     this.Modules.Add(this.scriptRecorderModuleBase1);
     this.Modules.Add(this.kpiModule1);
     this.Modules.Add(this.workflowModule1);
     this.Modules.Add(this.stateMachineModule1);
     this.Modules.Add(this._featureCenterModule1);
     this.Modules.Add(this.pivotChartAspNetModule1);
     this.Modules.Add(this.fileAttachmentsAspNetModule1);
     this.Modules.Add(this.htmlPropertyEditorAspNetModule1);
     this.Modules.Add(this.reportsModule1);
     this.Modules.Add(this.reportsAspNetModule1);
     this.Modules.Add(this.treeListEditorsModuleBase2);
     this.Modules.Add(this.treeListEditorsAspNetModule1);
     this.Modules.Add(this.schedulerModuleBase1);
     this.Modules.Add(this.schedulerAspNetModule1);
     this.Modules.Add(this.featureCenterAspNetModule1);
     this.Security = this._securityComplex1;
     this.DatabaseVersionMismatch += new System.EventHandler <DevExpress.ExpressApp.DatabaseVersionMismatchEventArgs>(this.AspNetApplicationDatabaseVersionMismatch);
     ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
 }