当前位置: 首页>>代码示例>>C#>>正文


C# IAuthenticationContext.CheckPermission方法代码示例

本文整理汇总了C#中IAuthenticationContext.CheckPermission方法的典型用法代码示例。如果您正苦于以下问题:C# IAuthenticationContext.CheckPermission方法的具体用法?C# IAuthenticationContext.CheckPermission怎么用?C# IAuthenticationContext.CheckPermission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IAuthenticationContext的用法示例。


在下文中一共展示了IAuthenticationContext.CheckPermission方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TaxesMainSettingsViewModel

		public TaxesMainSettingsViewModel(
			ITaxCategorySettingsViewModel taxCategorySettingsViewModel,
			ITaxSettingsViewModel taxSettingsViewModel,
			IViewModelsFactory<IJurisdictionSettingsViewModel> jSettingsVmFactory,
			IViewModelsFactory<IJurisdictionGroupSettingsViewModel> jGroupVmFactory,
			IViewModelsFactory<ITaxImportHomeViewModel> importVmFactory,
			IAuthenticationContext authContext)
		{
			SubItems = new List<ItemTypeHomeTab>();

			if (authContext.CheckPermission(PredefinedPermissions.SettingsTaxCategories))
			{
                SubItems.Add(new ItemTypeHomeTab { Caption = "Tax categories", Category = NavigationNames.ModuleName, ViewModel = taxCategorySettingsViewModel });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SettingsJurisdiction))
			{
                SubItems.Add(new ItemTypeHomeTab { Caption = "Jurisdictions", Category = NavigationNames.ModuleName, ViewModel = jSettingsVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("jurisdictionType", JurisdictionTypes.Taxes)) });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SettingsJurisdictionGroups))
			{
                SubItems.Add(new ItemTypeHomeTab { Caption = "Jurisdiction groups", Category = NavigationNames.ModuleName, ViewModel = jGroupVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("jurisdictionType", JurisdictionTypes.Taxes)) });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SettingsTaxes))
			{
                SubItems.Add(new ItemTypeHomeTab { Caption = "Taxes", Category = NavigationNames.ModuleName, ViewModel = taxSettingsViewModel });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SettingsTaxImport))
			{
                SubItems.Add(new ItemTypeHomeTab { IdTab = Configuration.NavigationNames.HomeName, Caption = "Import", Category = NavigationNames.ModuleName, ViewModel = importVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("parentViewModel", this)) });
			}
			CurrentTab = SubItems[0];
		}
开发者ID:Wdovin,项目名称:vc-community,代码行数:32,代码来源:TaxesMainSettingsViewModel.cs

示例2: AppConfigMainSettingsViewModel

        public AppConfigMainSettingsViewModel(IAppConfigSettingsViewModel appConfigSetting, ISystemJobsViewModel systemJobSetting, IEmailTemplatesViewModel emailTemplates, IDisplayTemplatesViewModel displayTemplates, ILocalizationMainViewModel localizationHome, ICacheViewModel cacheViewModel, IAuthenticationContext authContext)
        {
            var items = new List<ItemTypeHomeTab>();

            if (authContext.CheckPermission(PredefinedPermissions.SettingsAppConfigSettings))
            {
                items.Add(new ItemTypeHomeTab { Caption = "Settings", Category = NavigationNames.ModuleName, ViewModel = appConfigSetting });
            }
            if (authContext.CheckPermission(PredefinedPermissions.SettingsAppConfigSystemJobs))
            {
                items.Add(new ItemTypeHomeTab { Caption = "System jobs", Category = NavigationNames.ModuleName, ViewModel = systemJobSetting });
            }
            if (authContext.CheckPermission(PredefinedPermissions.SettingsAppConfigEmailTemplates))
            {
                items.Add(new ItemTypeHomeTab { Caption = "Email templates", Category = NavigationNames.ModuleName, ViewModel = emailTemplates });
            }
            if (authContext.CheckPermission(PredefinedPermissions.SettingsAppConfigDisplayTemplates))
            {
                items.Add(new ItemTypeHomeTab { Caption = "Display templates", Category = NavigationNames.ModuleName, ViewModel = displayTemplates });
            }
            items.Add(new ItemTypeHomeTab { Caption = "Localization", Category = NavigationNames.ModuleName, ViewModel = localizationHome });

            if (authContext.CheckPermission(PredefinedPermissions.SettingsAppConfigSettings))
            {
                items.Add(new ItemTypeHomeTab { Caption = "Cache", Category = NavigationNames.ModuleName, ViewModel = cacheViewModel });
            }

            SubItems = items;
            if (SubItems.Count > 0)
            {
                CurrentTab = SubItems[0];
            }
        }
开发者ID:Wdovin,项目名称:vc-community,代码行数:33,代码来源:AppConfigMainSettingsViewModel.cs

示例3: ShippingMainSettingsViewModel

		public ShippingMainSettingsViewModel(
			IShippingOptionSettingsViewModel shippingOptionSettingsViewModel,
 			IShippingMethodSettingsViewModel shippingMethodSettingsViewModel,
			IShippingPackageSettingsViewModel shippingPackageSettingsViewModel,
			IViewModelsFactory<IJurisdictionSettingsViewModel> jurisdictionSettingsVmFactory,
			IViewModelsFactory<IJurisdictionGroupSettingsViewModel> jGroupVmFactory,
			IAuthenticationContext authContext)
 		{

			SubItems = new List<ItemTypeHomeTab>();

			if (authContext.CheckPermission(PredefinedPermissions.SettingsShippingOptions))
			{
				SubItems.Add(new ItemTypeHomeTab { Caption = "Shipping options", ViewModel = shippingOptionSettingsViewModel });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SettingsShippingMethods))
			{
				SubItems.Add(new ItemTypeHomeTab { Caption = "Shipping methods", ViewModel = shippingMethodSettingsViewModel });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SettingsShippingPackages))
			{
				SubItems.Add(new ItemTypeHomeTab { Caption = "Shipping packages", ViewModel = shippingPackageSettingsViewModel });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SettingsJurisdiction))
			{
				SubItems.Add(new ItemTypeHomeTab { Caption = "Jurisdictions", ViewModel = jurisdictionSettingsVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("jurisdictionType", JurisdictionTypes.Shipping)) });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SettingsJurisdictionGroups))
			{
				SubItems.Add(new ItemTypeHomeTab { Caption = "Jurisdiction groups", ViewModel = jGroupVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("jurisdictionType", JurisdictionTypes.Shipping)) });
			}
			CurrentTab = SubItems[0];
		}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:33,代码来源:ShippingMainSettingsViewModel.cs

示例4: LocalizationMainViewModel

		public LocalizationMainViewModel(ILocalizationHomeViewModel homeViewModel, IViewModelsFactory<ILocalizationImportJobHomeViewModel> importVmFactory, IAuthenticationContext authContext)
		{
			ViewTitle = new ViewTitleBase() { Title = "Localization", SubTitle = "SETTINGS" };
			SubItems = new List<ItemTypeHomeTab>();

			if (authContext.CheckPermission(PredefinedPermissions.Name_SettingsAppConfigSettings))
			{
				SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeName, Caption = "Localizations", ViewModel = homeViewModel });
			}

			if (authContext.CheckPermission(PredefinedPermissions.Name_SettingsAppConfigSettings))
			{
				SubItems.Add(new ItemTypeHomeTab { IdTab = Configuration.NavigationNames.HomeName, Caption = "Import", ViewModel = importVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("parentViewModel", this)) });
			}

			if (SubItems.Count > 0)
				CurrentTab = SubItems[0];
		}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:18,代码来源:LocalizationMainViewModel.cs

示例5: CaseCommunicationControlViewModel

		public CaseCommunicationControlViewModel(IAssetService assetService, IViewModelsFactory<IKnowledgeBaseDialogViewModel> knowledgeBaseGroupVmFactory, IAuthenticationContext authContext, string authorId, string authorName, CustomersDetailViewModel parentViewModel)
			: base(assetService, knowledgeBaseGroupVmFactory, authorId, authorName)
		{
			_parentViewModel = parentViewModel;
			_authContext = authContext;
			CommonConfirmRequest = new InteractionRequest<Confirmation>();
			IsReadOnly = !_authContext.CheckPermission(PredefinedPermissions.CustomersAddCaseComments);
			DefToolBarCommands();
		}
开发者ID:gitter-badger,项目名称:vc-community-1.x,代码行数:9,代码来源:CaseCommunicationControlViewModel.cs

示例6: MainPriceListViewModel

		public MainPriceListViewModel(IPriceListHomeViewModel priceListHomeViewModel, IPriceListAssignmentHomeViewModel priceListAssignmentHomeViewModel, IViewModelsFactory<IPricelistImportJobHomeViewModel> pricelistImportVmFactory, IAuthenticationContext authContext)
		{
			ViewTitle = new ViewTitleBase() { Title = "Price Lists", SubTitle = "MERCHANDISE MANAGEMENT" };

			SubItems = new List<ItemTypeHomeTab>();
			if (authContext.CheckPermission(PredefinedPermissions.PricingPrice_ListsManage))
			{
				SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNamePriceList, Caption = "Price Lists", ViewModel = priceListHomeViewModel });
			}
			if (authContext.CheckPermission(PredefinedPermissions.PricingPrice_List_AssignmentsManage))
			{
				SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNamePriceListAssignment, Caption = "Price List assignments", ViewModel = priceListAssignmentHomeViewModel });
			}
			if (authContext.CheckPermission(PredefinedPermissions.PricingPrice_ListsImport_Jobs) ||
				authContext.CheckPermission(PredefinedPermissions.PricingPrice_ListsImport_JobsRun))
			{
				SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNamePriceList, Caption = "Import", ViewModel = pricelistImportVmFactory.GetViewModelInstance(new KeyValuePair<string, object>("parentViewModel", this)) });
			}
			CurrentTab = SubItems[0];
		}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:20,代码来源:MainPriceListViewModel.cs

示例7: CatalogMainViewModel

		public CatalogMainViewModel(
			IViewModelsFactory<ICatalogHomeViewModel> catalogHomeVmFactory,
			IViewModelsFactory<ICatalogImportJobHomeViewModel> importVmFactory,
			IReviewsHomeViewModel reviewsHomeViewModel,
			IAuthenticationContext authContext)
		{
			SubItems = new List<ItemTypeHomeTab>();
			var parameters = new KeyValuePair<string, object>("parentViewModel", this);

            SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeName, Caption = "Catalog", Category = NavigationNames.ModuleName, ViewModel = catalogHomeVmFactory.GetViewModelInstance(parameters) });
			if (authContext.CheckPermission(PredefinedPermissions.CatalogCatalog_Import_JobsManage) ||
				authContext.CheckPermission(PredefinedPermissions.CatalogCatalog_Import_JobsRun))
			{
                SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeName, Caption = "Import", Category = NavigationNames.ModuleName, ViewModel = importVmFactory.GetViewModelInstance(parameters) });
			}
			if (authContext.CheckPermission(PredefinedPermissions.CatalogCustomerReviewsManage))
			{
                SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNameReviews, Caption = "Reviews", Category = NavigationNames.ModuleName, ViewModel = reviewsHomeViewModel });
			}
			CurrentTab = SubItems[0];
		}
开发者ID:Wdovin,项目名称:vc-community,代码行数:21,代码来源:CatalogMainViewModel.cs

示例8: SecurityMainViewModel

		public SecurityMainViewModel(IViewModelsFactory<IAccountHomeViewModel> accountVmFactory, IViewModelsFactory<IRoleHomeViewModel> roleVmFactory, IAuthenticationContext authContext)
		{
            ViewTitle = new ViewTitleBase
            {
                Title = "Users",
                SubTitle = "USER MANAGMENT"
            };

			SubItems = new List<ItemTypeHomeTab>();
			var parameters = new KeyValuePair<string, object>("parentViewModel", this);

			if (authContext.CheckPermission(PredefinedPermissions.SecurityAccounts))
			{
				SubItems.Add(new ItemTypeHomeTab { Caption = "Accounts", ViewModel = accountVmFactory.GetViewModelInstance(parameters) });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SecurityRoles))
			{
				SubItems.Add(new ItemTypeHomeTab { Caption = "Roles", ViewModel = roleVmFactory.GetViewModelInstance(parameters) });
			}
			CurrentTab = SubItems[0];
		}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:21,代码来源:SecurityMainViewModel.cs

示例9: CustomersMainSettingsViewModel

		public CustomersMainSettingsViewModel(
			ICaseRulesSettingsViewModel caseRulesSettingsViewModel,
			ICasePropertySetsSettingsViewModel casePropertySetsSettingsViewModel,
			ICaseTemplatesSettingsViewModel caseTemplatesSettingsViewModel,
			IAuthenticationContext authContext)
		{
			SubItems = new List<ItemTypeHomeTab>();

			if (authContext.CheckPermission(PredefinedPermissions.SettingsCustomerRules))
			{
                SubItems.Add(new ItemTypeHomeTab { Caption = "Rules", Category = NavigationNames.ModuleName, ViewModel = caseRulesSettingsViewModel, Order = 1 });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SettingsCustomerInfo))
			{
                SubItems.Add(new ItemTypeHomeTab { Caption = "Info", Category = NavigationNames.ModuleName, ViewModel = casePropertySetsSettingsViewModel, Order = 2 });
			}
			if (authContext.CheckPermission(PredefinedPermissions.SettingsCustomerCaseTypes))
			{
                SubItems.Add(new ItemTypeHomeTab { Caption = "Case types", Category = NavigationNames.ModuleName, ViewModel = caseTemplatesSettingsViewModel, Order = 3 });
			}
			CurrentTab = SubItems[0];
		}
开发者ID:gitter-badger,项目名称:vc-community-1.x,代码行数:22,代码来源:CustomersMainSettingsViewModel.cs

示例10: MainMarketingViewModel

		public MainMarketingViewModel(IMarketingHomeViewModel marketingVm, IDynamicContentHomeViewModel contentVm, IContentPublishingHomeViewModel publishingVm, IAuthenticationContext authContext)
		{
            ViewTitle = new ViewTitleBase
            {
                Title="Marketing",
                SubTitle="MARKETING SERVICE"
            };

			SubItems = new List<ItemTypeHomeTab>();

			if (authContext.CheckPermission(PredefinedPermissions.MarketingPromotionsManage))
			{
				SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeName, Caption = "Promotions", ViewModel = marketingVm });
			}
			if (authContext.CheckPermission(PredefinedPermissions.MarketingDynamic_ContentManage))
			{
				SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNameDynamicContent, Caption = "Dynamic content", Order = 10, ViewModel = contentVm });
			}
			if (authContext.CheckPermission(PredefinedPermissions.MarketingContent_PublishingManage))
			{
				SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNameContentPublishing, Caption = "Content publishing", Order = 20, ViewModel = publishingVm });
			}
			CurrentTab = SubItems[0];
		}
开发者ID:karpinskiy,项目名称:vc-community,代码行数:24,代码来源:MainMarketingViewModel.cs

示例11: CustomersMainViewModel

		public CustomersMainViewModel(ICustomersHomeViewModel customersHomeViewModel, ISearchHomeViewModel searchHomeViewModel,  IAuthenticationContext authContext)
        {
			ViewTitle = new ViewTitleBase() { Title = "Cases", SubTitle = "CUSTOMER SERVICE" };
            SubItems = new List<ItemTypeHomeTab>
	            {
		            new ItemTypeHomeTab
			            {
				            IdTab = NavigationNames.HomeName,
				            Caption = "Cases",
				            ViewModel = customersHomeViewModel
			            }
	            };

			if (authContext.CheckPermission(PredefinedPermissions.CustomersSearchCases))
			{
				SubItems.Add(new ItemTypeHomeTab { IdTab = NavigationNames.HomeNameSearch, Caption = "Search", ViewModel = searchHomeViewModel });
			}
			CurrentTab = SubItems[0];
        }
开发者ID:karpinskiy,项目名称:vc-community,代码行数:19,代码来源:CustomersMainViewModel.cs


注:本文中的IAuthenticationContext.CheckPermission方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。