public void Start(IApplicationStartContext StartContext) { StartContext.SetPageView((LogonViewModel model) => { return(new ExtendedViews.LogOn()); }, () => { return(new ExtendedViews.PublicMaster()); }); ////**********为各不同的安全管理的不同页面控制器设置过滤器 //StartContext.SetPageFilter((PageControllerItems controllerItem) => //{ // return default(System.Web.Mvc.IActionFilter); //}); ////********设置是否允许匿名注册用户 ////默认或者不设置则允许匿名注册用户,但设置为flase则需要具有AdministrationRights.UserManage ////权限的用户才能注册用户 //StartContext.AllowAnonymousRegister(false); //********设置契约装饰器********** //通过为契约配置装饰器可以拦截契约的方法,但每个契约只能接受一个装饰器,最后设置的有效 //StartContext.SetContractDecorator(() => //{ // return new AccountContractDecorator(); //}); ////设置安全管理的数据库联接构造,没有设置的时候系统默认 ////使用Web.config中的"SecurityAppConnection"连接字符串 //StartContext.SetDbConnectionBuilder(() => //{ // return new System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["SecurityAppConnection"].ConnectionString); //}); StartContext.SetMvcDefaultArea(() => "Blog"); StartContext.SetMvcDefaultTheme(() => "Default"); StartContext.RegisterSystemRightType <BlogRights>(); }
public void Start(IApplicationStartContext StartContext) { StartContext.SetPageView((LogonViewModel model) => { return new ExtendedViews.LogOn(); }, () => { return new ExtendedViews.PublicMaster(); }); ////**********为各不同的安全管理的不同页面控制器设置过滤器 //StartContext.SetPageFilter((PageControllerItems controllerItem) => //{ // return default(System.Web.Mvc.IActionFilter); //}); ////********设置是否允许匿名注册用户 ////默认或者不设置则允许匿名注册用户,但设置为flase则需要具有AdministrationRights.UserManage ////权限的用户才能注册用户 //StartContext.AllowAnonymousRegister(false); //********设置契约装饰器********** //通过为契约配置装饰器可以拦截契约的方法,但每个契约只能接受一个装饰器,最后设置的有效 //StartContext.SetContractDecorator(() => //{ // return new AccountContractDecorator(); //}); ////设置安全管理的数据库联接构造,没有设置的时候系统默认 ////使用Web.config中的"SecurityAppConnection"连接字符串 //StartContext.SetDbConnectionBuilder(() => //{ // return new System.Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["SecurityAppConnection"].ConnectionString); //}); StartContext.SetMvcDefaultArea(() => "Blog"); StartContext.SetMvcDefaultTheme(() => "Default"); StartContext.RegisterSystemRightType<BlogRights>(); }
public void PreStart(IApplicationStartContext StartContext) { StartContext.SetPageView((NotificationViewModel model) => { return new Views.Notification(); }, () => { return default(SiteMaster); }); StartContext.SetPageView((LogonViewModel model) => { return new Views.LogOn(); }, () => { return new Views.PublicMaster(); }); StartContext.SetPageView((RegisterViewModel model) => { return new Views.Register(); }, () => { return new Views.PublicMaster(); }); StartContext.SetPageView((ChangePasswordViewModel model) => { return new Views.ChangePassword(); }, () => { return new Views.PublicMaster(); }); StartContext.SetPageView((ResetNickNameViewModel model) => { return new Views.ResetNickName(); }, () => { return new Views.PublicMaster(); }); StartContext.SetPageView((NewRoleViewModel model) => { return new Views.NewRole(); }, () => { return new Views.InternalMaster(); }); StartContext.SetPageView((ListRoleViewModel model) => { return new Views.ListRole(); }, () => { return new Views.InternalMaster(); }); StartContext.SetPageView((ListUserViewModel model) => { return new Views.ListUser(); }, () => { return new Views.InternalMaster(); }); StartContext.SetPageView((ResetPasswordViewModel model) => { return new Views.ResetPassword(); }, () => { return new Views.InternalMaster(); }); StartContext.SetPageView((AuthorizeUserViewModel model) => { return new Views.AuthorizeUser(); }, () => { return new Views.InternalMaster(); }); StartContext.SetPageView((DroitConfigViewModel model) => { return new Views.DroitConfig(); }, () => { return new Views.InternalMaster(); }); }
public void PreStart(IApplicationStartContext StartContext) { StartContext.SetPageView((NotificationViewModel model) => { return(new Views.Notification()); }, () => { return(default(SiteMaster)); }); StartContext.SetPageView((LogonViewModel model) => { return(new Views.LogOn()); }, () => { return(new Views.PublicMaster()); }); StartContext.SetPageView((RegisterViewModel model) => { return(new Views.Register()); }, () => { return(new Views.PublicMaster()); }); StartContext.SetPageView((ChangePasswordViewModel model) => { return(new Views.ChangePassword()); }, () => { return(new Views.PublicMaster()); }); StartContext.SetPageView((ResetNickNameViewModel model) => { return(new Views.ResetNickName()); }, () => { return(new Views.PublicMaster()); }); StartContext.SetPageView((NewRoleViewModel model) => { return(new Views.NewRole()); }, () => { return(new Views.InternalMaster()); }); StartContext.SetPageView((ListRoleViewModel model) => { return(new Views.ListRole()); }, () => { return(new Views.InternalMaster()); }); StartContext.SetPageView((ListUserViewModel model) => { return(new Views.ListUser()); }, () => { return(new Views.InternalMaster()); }); StartContext.SetPageView((ResetPasswordViewModel model) => { return(new Views.ResetPassword()); }, () => { return(new Views.InternalMaster()); }); StartContext.SetPageView((AuthorizeUserViewModel model) => { return(new Views.AuthorizeUser()); }, () => { return(new Views.InternalMaster()); }); StartContext.SetPageView((DroitConfigViewModel model) => { return(new Views.DroitConfig()); }, () => { return(new Views.InternalMaster()); }); }