public override void Define(IPermissionDefinitionContext context)
    {
        var cmsGroup = context.GetGroupOrNull(CmsKitAdminPermissions.GroupName) ?? context.AddGroup(CmsKitAdminPermissions.GroupName, L("Permission:CmsKit"));

        var contentGroup = cmsGroup.AddPermission(CmsKitAdminPermissions.Comments.Default, L("Permission:Comments"))
                           .RequireGlobalFeatures(typeof(CommentsFeature));

        contentGroup.AddChild(CmsKitAdminPermissions.Comments.Delete, L("Permission:Comments.Delete"))
        .RequireGlobalFeatures(typeof(CommentsFeature));

        var tagGroup = cmsGroup.AddPermission(CmsKitAdminPermissions.Tags.Default, L("Permission:TagManagement"))
                       .RequireGlobalFeatures(typeof(TagsFeature));

        tagGroup.AddChild(CmsKitAdminPermissions.Tags.Create, L("Permission:TagManagement.Create"))
        .RequireGlobalFeatures(typeof(TagsFeature));
        tagGroup.AddChild(CmsKitAdminPermissions.Tags.Update, L("Permission:TagManagement.Update"))
        .RequireGlobalFeatures(typeof(TagsFeature));
        tagGroup.AddChild(CmsKitAdminPermissions.Tags.Delete, L("Permission:TagManagement.Delete"))
        .RequireGlobalFeatures(typeof(TagsFeature));

        var pageManagement = cmsGroup.AddPermission(CmsKitAdminPermissions.Pages.Default, L("Permission:PageManagement"))
                             .RequireGlobalFeatures(typeof(PagesFeature));

        pageManagement.AddChild(CmsKitAdminPermissions.Pages.Create, L("Permission:PageManagement:Create"))
        .RequireGlobalFeatures(typeof(PagesFeature));
        pageManagement.AddChild(CmsKitAdminPermissions.Pages.Update, L("Permission:PageManagement:Update"))
        .RequireGlobalFeatures(typeof(PagesFeature));
        pageManagement.AddChild(CmsKitAdminPermissions.Pages.Delete, L("Permission:PageManagement:Delete"))
        .RequireGlobalFeatures(typeof(PagesFeature));

        var blogManagement = cmsGroup.AddPermission(CmsKitAdminPermissions.Blogs.Default, L("Permission:BlogManagement"))
                             .RequireGlobalFeatures(typeof(BlogsFeature));

        blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Create, L("Permission:BlogManagement.Create"))
        .RequireGlobalFeatures(typeof(BlogsFeature));
        blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Update, L("Permission:BlogManagement.Update"))
        .RequireGlobalFeatures(typeof(BlogsFeature));
        blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Delete, L("Permission:BlogManagement.Delete"))
        .RequireGlobalFeatures(typeof(BlogsFeature));
        blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Features, L("Permission:BlogManagement.Features"))
        .RequireGlobalFeatures(typeof(BlogsFeature));

        var blogPostManagement = cmsGroup.AddPermission(CmsKitAdminPermissions.BlogPosts.Default, L("Permission:BlogPostManagement"))
                                 .RequireGlobalFeatures(typeof(BlogsFeature));

        blogPostManagement.AddChild(CmsKitAdminPermissions.BlogPosts.Create, L("Permission:BlogPostManagement.Create"))
        .RequireGlobalFeatures(typeof(BlogsFeature));
        blogPostManagement.AddChild(CmsKitAdminPermissions.BlogPosts.Update, L("Permission:BlogPostManagement.Update"))
        .RequireGlobalFeatures(typeof(BlogsFeature));
        blogPostManagement.AddChild(CmsKitAdminPermissions.BlogPosts.Delete, L("Permission:BlogPostManagement.Delete"))
        .RequireGlobalFeatures(typeof(BlogsFeature));

        var menuManagement = cmsGroup.AddPermission(CmsKitAdminPermissions.Menus.Default, L("Permission:MenuManagement"))
                             .RequireGlobalFeatures(typeof(MenuFeature));

        menuManagement.AddChild(CmsKitAdminPermissions.Menus.Create, L("Permission:MenuManagement.Create"))
        .RequireGlobalFeatures(typeof(MenuFeature));
        menuManagement.AddChild(CmsKitAdminPermissions.Menus.Update, L("Permission:MenuManagement.Update"))
        .RequireGlobalFeatures(typeof(MenuFeature));
        menuManagement.AddChild(CmsKitAdminPermissions.Menus.Delete, L("Permission:MenuManagement.Delete"))
        .RequireGlobalFeatures(typeof(MenuFeature));
    }
Esempio n. 2
0
 public override void Define(IPermissionDefinitionContext context)
 {
     var moduleGroup = context.AddGroup(SettingUiPermissions.GroupName, L("Permission:SettingUi"));
     var showSettingPagePermission = moduleGroup.AddPermission(SettingUiPermissions.ShowSettingPage, L("Permission:SettingUi.ShowSettingPage"));
 }
        public override void Define(IPermissionDefinitionContext context)
        {
            var myGroup = context.AddGroup(SolutionPermissions.GroupName);

            //Define your own permissions here. Example:
            //myGroup.AddPermission(SolutionPermissions.MyPermission1, L("Permission:MyPermission1"));

            var enterprisePermission = myGroup.AddPermission(SolutionPermissions.Enterprises.Default, L("Permission:Enterprises"));

            enterprisePermission.AddChild(SolutionPermissions.Enterprises.Create, L("Permission:Create"));
            enterprisePermission.AddChild(SolutionPermissions.Enterprises.Update, L("Permission:Update"));
            enterprisePermission.AddChild(SolutionPermissions.Enterprises.Delete, L("Permission:Delete"));

            var enterpriseAreaPermission = myGroup.AddPermission(SolutionPermissions.EnterpriseAreas.Default, L("Permission:EnterpriseAreas"));

            enterpriseAreaPermission.AddChild(SolutionPermissions.EnterpriseAreas.Create, L("Permission:Create"));
            enterpriseAreaPermission.AddChild(SolutionPermissions.EnterpriseAreas.Update, L("Permission:Update"));
            enterpriseAreaPermission.AddChild(SolutionPermissions.EnterpriseAreas.Delete, L("Permission:Delete"));

            var enterpriseProductionLinePermission = myGroup.AddPermission(SolutionPermissions.EnterpriseProductionLines.Default, L("Permission:EnterpriseProductionLines"));

            enterpriseProductionLinePermission.AddChild(SolutionPermissions.EnterpriseProductionLines.Create, L("Permission:Create"));
            enterpriseProductionLinePermission.AddChild(SolutionPermissions.EnterpriseProductionLines.Update, L("Permission:Update"));
            enterpriseProductionLinePermission.AddChild(SolutionPermissions.EnterpriseProductionLines.Delete, L("Permission:Delete"));

            var enterpriseSitePermission = myGroup.AddPermission(SolutionPermissions.EnterpriseSites.Default, L("Permission:EnterpriseSites"));

            enterpriseSitePermission.AddChild(SolutionPermissions.EnterpriseSites.Create, L("Permission:Create"));
            enterpriseSitePermission.AddChild(SolutionPermissions.EnterpriseSites.Update, L("Permission:Update"));
            enterpriseSitePermission.AddChild(SolutionPermissions.EnterpriseSites.Delete, L("Permission:Delete"));

            var enterpriseWorkCenterPermission = myGroup.AddPermission(SolutionPermissions.EnterpriseWorkCenters.Default, L("Permission:EnterpriseWorkCenters"));

            enterpriseWorkCenterPermission.AddChild(SolutionPermissions.EnterpriseWorkCenters.Create, L("Permission:Create"));
            enterpriseWorkCenterPermission.AddChild(SolutionPermissions.EnterpriseWorkCenters.Update, L("Permission:Update"));
            enterpriseWorkCenterPermission.AddChild(SolutionPermissions.EnterpriseWorkCenters.Delete, L("Permission:Delete"));

            var enterpriseWorkLocationPermission = myGroup.AddPermission(SolutionPermissions.EnterpriseWorkLocations.Default, L("Permission:EnterpriseWorkLocations"));

            enterpriseWorkLocationPermission.AddChild(SolutionPermissions.EnterpriseWorkLocations.Create, L("Permission:Create"));
            enterpriseWorkLocationPermission.AddChild(SolutionPermissions.EnterpriseWorkLocations.Update, L("Permission:Update"));
            enterpriseWorkLocationPermission.AddChild(SolutionPermissions.EnterpriseWorkLocations.Delete, L("Permission:Delete"));

            var equipmentPermission = myGroup.AddPermission(SolutionPermissions.Equipments.Default, L("Permission:Equipments"));

            equipmentPermission.AddChild(SolutionPermissions.Equipments.Create, L("Permission:Create"));
            equipmentPermission.AddChild(SolutionPermissions.Equipments.Update, L("Permission:Update"));
            equipmentPermission.AddChild(SolutionPermissions.Equipments.Delete, L("Permission:Delete"));

            var equipmentBrandPermission = myGroup.AddPermission(SolutionPermissions.EquipmentBrands.Default, L("Permission:EquipmentBrands"));

            equipmentBrandPermission.AddChild(SolutionPermissions.EquipmentBrands.Create, L("Permission:Create"));
            equipmentBrandPermission.AddChild(SolutionPermissions.EquipmentBrands.Update, L("Permission:Update"));
            equipmentBrandPermission.AddChild(SolutionPermissions.EquipmentBrands.Delete, L("Permission:Delete"));

            var equipmentInspectionPermission = myGroup.AddPermission(SolutionPermissions.EquipmentInspections.Default, L("Permission:EquipmentInspections"));

            equipmentInspectionPermission.AddChild(SolutionPermissions.EquipmentInspections.Create, L("Permission:Create"));
            equipmentInspectionPermission.AddChild(SolutionPermissions.EquipmentInspections.Update, L("Permission:Update"));
            equipmentInspectionPermission.AddChild(SolutionPermissions.EquipmentInspections.Delete, L("Permission:Delete"));

            var equipmentInspectionResultPermission = myGroup.AddPermission(SolutionPermissions.EquipmentInspectionResults.Default, L("Permission:EquipmentInspectionResults"));

            equipmentInspectionResultPermission.AddChild(SolutionPermissions.EquipmentInspectionResults.Create, L("Permission:Create"));
            equipmentInspectionResultPermission.AddChild(SolutionPermissions.EquipmentInspectionResults.Update, L("Permission:Update"));
            equipmentInspectionResultPermission.AddChild(SolutionPermissions.EquipmentInspectionResults.Delete, L("Permission:Delete"));

            var equipmentMaintenancePermission = myGroup.AddPermission(SolutionPermissions.EquipmentMaintenances.Default, L("Permission:EquipmentMaintenances"));

            equipmentMaintenancePermission.AddChild(SolutionPermissions.EquipmentMaintenances.Create, L("Permission:Create"));
            equipmentMaintenancePermission.AddChild(SolutionPermissions.EquipmentMaintenances.Update, L("Permission:Update"));
            equipmentMaintenancePermission.AddChild(SolutionPermissions.EquipmentMaintenances.Delete, L("Permission:Delete"));

            var equipmentMaintenanceResultPermission = myGroup.AddPermission(SolutionPermissions.EquipmentMaintenanceResults.Default, L("Permission:EquipmentMaintenanceResults"));

            equipmentMaintenanceResultPermission.AddChild(SolutionPermissions.EquipmentMaintenanceResults.Create, L("Permission:Create"));
            equipmentMaintenanceResultPermission.AddChild(SolutionPermissions.EquipmentMaintenanceResults.Update, L("Permission:Update"));
            equipmentMaintenanceResultPermission.AddChild(SolutionPermissions.EquipmentMaintenanceResults.Delete, L("Permission:Delete"));

            var equipmentSparePartPermission = myGroup.AddPermission(SolutionPermissions.EquipmentSpareParts.Default, L("Permission:EquipmentSpareParts"));

            equipmentSparePartPermission.AddChild(SolutionPermissions.EquipmentSpareParts.Create, L("Permission:Create"));
            equipmentSparePartPermission.AddChild(SolutionPermissions.EquipmentSpareParts.Update, L("Permission:Update"));
            equipmentSparePartPermission.AddChild(SolutionPermissions.EquipmentSpareParts.Delete, L("Permission:Delete"));

            var equipmentSparePartTypePermission = myGroup.AddPermission(SolutionPermissions.EquipmentSparePartTypes.Default, L("Permission:EquipmentSparePartTypes"));

            equipmentSparePartTypePermission.AddChild(SolutionPermissions.EquipmentSparePartTypes.Create, L("Permission:Create"));
            equipmentSparePartTypePermission.AddChild(SolutionPermissions.EquipmentSparePartTypes.Update, L("Permission:Update"));
            equipmentSparePartTypePermission.AddChild(SolutionPermissions.EquipmentSparePartTypes.Delete, L("Permission:Delete"));

            var equipmentStatusPermission = myGroup.AddPermission(SolutionPermissions.EquipmentStatus.Default, L("Permission:EquipmentStatus"));

            equipmentStatusPermission.AddChild(SolutionPermissions.EquipmentStatus.Create, L("Permission:Create"));
            equipmentStatusPermission.AddChild(SolutionPermissions.EquipmentStatus.Update, L("Permission:Update"));
            equipmentStatusPermission.AddChild(SolutionPermissions.EquipmentStatus.Delete, L("Permission:Delete"));

            var equipmentTypePermission = myGroup.AddPermission(SolutionPermissions.EquipmentTypes.Default, L("Permission:EquipmentTypes"));

            equipmentTypePermission.AddChild(SolutionPermissions.EquipmentTypes.Create, L("Permission:Create"));
            equipmentTypePermission.AddChild(SolutionPermissions.EquipmentTypes.Update, L("Permission:Update"));
            equipmentTypePermission.AddChild(SolutionPermissions.EquipmentTypes.Delete, L("Permission:Delete"));

            var materialPermission = myGroup.AddPermission(SolutionPermissions.Materials.Default, L("Permission:Materials"));

            materialPermission.AddChild(SolutionPermissions.Materials.Create, L("Permission:Create"));
            materialPermission.AddChild(SolutionPermissions.Materials.Update, L("Permission:Update"));
            materialPermission.AddChild(SolutionPermissions.Materials.Delete, L("Permission:Delete"));

            var productPermission = myGroup.AddPermission(SolutionPermissions.Products.Default, L("Permission:Products"));

            productPermission.AddChild(SolutionPermissions.Products.Create, L("Permission:Create"));
            productPermission.AddChild(SolutionPermissions.Products.Update, L("Permission:Update"));
            productPermission.AddChild(SolutionPermissions.Products.Delete, L("Permission:Delete"));

            var productTypePermission = myGroup.AddPermission(SolutionPermissions.ProductTypes.Default, L("Permission:ProductTypes"));

            productTypePermission.AddChild(SolutionPermissions.ProductTypes.Create, L("Permission:Create"));
            productTypePermission.AddChild(SolutionPermissions.ProductTypes.Update, L("Permission:Update"));
            productTypePermission.AddChild(SolutionPermissions.ProductTypes.Delete, L("Permission:Delete"));

            var bOMPermission = myGroup.AddPermission(SolutionPermissions.BOMs.Default, L("Permission:Materials"));

            bOMPermission.AddChild(SolutionPermissions.BOMs.Create, L("Permission:Create"));
            bOMPermission.AddChild(SolutionPermissions.BOMs.Update, L("Permission:Update"));
            bOMPermission.AddChild(SolutionPermissions.BOMs.Delete, L("Permission:Delete"));

            var unitPermission = myGroup.AddPermission(SolutionPermissions.Units.Default, L("Permission:Public"));

            unitPermission.AddChild(SolutionPermissions.Units.Create, L("Permission:Create"));
            unitPermission.AddChild(SolutionPermissions.Units.Update, L("Permission:Update"));
            unitPermission.AddChild(SolutionPermissions.Units.Delete, L("Permission:Delete"));

            var qualityInspectPermission = myGroup.AddPermission(SolutionPermissions.QualityInspects.Default, L("Permission:QualityInspects"));

            qualityInspectPermission.AddChild(SolutionPermissions.QualityInspects.Create, L("Permission:Create"));
            qualityInspectPermission.AddChild(SolutionPermissions.QualityInspects.Update, L("Permission:Update"));
            qualityInspectPermission.AddChild(SolutionPermissions.QualityInspects.Delete, L("Permission:Delete"));

            var qualityInspectResultPermission = myGroup.AddPermission(SolutionPermissions.QualityInspectResults.Default, L("Permission:QualityInspectResults"));

            qualityInspectResultPermission.AddChild(SolutionPermissions.QualityInspectResults.Create, L("Permission:Create"));
            qualityInspectResultPermission.AddChild(SolutionPermissions.QualityInspectResults.Update, L("Permission:Update"));
            qualityInspectResultPermission.AddChild(SolutionPermissions.QualityInspectResults.Delete, L("Permission:Delete"));

            var qualityInspectTypePermission = myGroup.AddPermission(SolutionPermissions.QualityInspectTypes.Default, L("Permission:QualityInspectTypes"));

            qualityInspectTypePermission.AddChild(SolutionPermissions.QualityInspectTypes.Create, L("Permission:Create"));
            qualityInspectTypePermission.AddChild(SolutionPermissions.QualityInspectTypes.Update, L("Permission:Update"));
            qualityInspectTypePermission.AddChild(SolutionPermissions.QualityInspectTypes.Delete, L("Permission:Delete"));

            var qualityProblemLibPermission = myGroup.AddPermission(SolutionPermissions.QualityProblemLibs.Default, L("Permission:QualityProblemLibs"));

            qualityProblemLibPermission.AddChild(SolutionPermissions.QualityProblemLibs.Create, L("Permission:Create"));
            qualityProblemLibPermission.AddChild(SolutionPermissions.QualityProblemLibs.Update, L("Permission:Update"));
            qualityProblemLibPermission.AddChild(SolutionPermissions.QualityProblemLibs.Delete, L("Permission:Delete"));

            var suppliersPermission = myGroup.AddPermission(SolutionPermissions.Suppliers.Default, L("Permission:Suppliers"));

            suppliersPermission.AddChild(SolutionPermissions.Suppliers.Create, L("Permission:Create"));
            suppliersPermission.AddChild(SolutionPermissions.Suppliers.Update, L("Permission:Update"));
            suppliersPermission.AddChild(SolutionPermissions.Suppliers.Delete, L("Permission:Delete"));

            var supplierLevelPermission = myGroup.AddPermission(SolutionPermissions.SupplierLevels.Default, L("Permission:SupplierLevels"));

            supplierLevelPermission.AddChild(SolutionPermissions.SupplierLevels.Create, L("Permission:Create"));
            supplierLevelPermission.AddChild(SolutionPermissions.SupplierLevels.Update, L("Permission:Update"));
            supplierLevelPermission.AddChild(SolutionPermissions.SupplierLevels.Delete, L("Permission:Delete"));

            var warehousePermission = myGroup.AddPermission(SolutionPermissions.Warehouses.Default, L("Permission:Warehouses"));

            warehousePermission.AddChild(SolutionPermissions.Warehouses.Create, L("Permission:Create"));
            warehousePermission.AddChild(SolutionPermissions.Warehouses.Update, L("Permission:Update"));
            warehousePermission.AddChild(SolutionPermissions.Warehouses.Delete, L("Permission:Delete"));

            var warehouseAreaPermission = myGroup.AddPermission(SolutionPermissions.WarehouseAreas.Default, L("Permission:WarehouseAreas"));

            warehouseAreaPermission.AddChild(SolutionPermissions.WarehouseAreas.Create, L("Permission:Create"));
            warehouseAreaPermission.AddChild(SolutionPermissions.WarehouseAreas.Update, L("Permission:Update"));
            warehouseAreaPermission.AddChild(SolutionPermissions.WarehouseAreas.Delete, L("Permission:Delete"));

            var wareHouseLocationPermission = myGroup.AddPermission(SolutionPermissions.WareHouseLocations.Default, L("Permission:WareHouseLocations"));

            wareHouseLocationPermission.AddChild(SolutionPermissions.WareHouseLocations.Create, L("Permission:Create"));
            wareHouseLocationPermission.AddChild(SolutionPermissions.WareHouseLocations.Update, L("Permission:Update"));
            wareHouseLocationPermission.AddChild(SolutionPermissions.WareHouseLocations.Delete, L("Permission:Delete"));

            var warehouseTypePermission = myGroup.AddPermission(SolutionPermissions.WarehouseTypes.Default, L("Permission:WarehouseTypes"));

            warehouseTypePermission.AddChild(SolutionPermissions.WarehouseTypes.Create, L("Permission:Create"));
            warehouseTypePermission.AddChild(SolutionPermissions.WarehouseTypes.Update, L("Permission:Update"));
            warehouseTypePermission.AddChild(SolutionPermissions.WarehouseTypes.Delete, L("Permission:Delete"));
        }
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(CmsKitAdminPermissions.GroupName, L("Permission:CmsKit.Admin"));
 }
Esempio n. 5
0
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(SurveyPermissions.GroupName, L("Permission:Survey"));
 }
Esempio n. 6
0
 public override void Define(IPermissionDefinitionContext context)
 {
     var business = context.AddGroup(BusinessPermissions.Business, L("Business"), MultiTenancySides.Tenant);
 }
Esempio n. 7
0
        public override void Define(IPermissionDefinitionContext context)
        {
            var cmsGroup = context.GetGroupOrNull(CmsKitAdminPermissions.GroupName) ?? context.AddGroup(CmsKitAdminPermissions.GroupName, L("Permission:CmsKit"));

            if (GlobalFeatureManager.Instance.IsEnabled <CommentsFeature>())
            {
                var contentGroup = cmsGroup.AddPermission(CmsKitAdminPermissions.Comments.Default, L("Permission:Comments"));
                contentGroup.AddChild(CmsKitAdminPermissions.Comments.Delete, L("Permission:Comments.Delete"));
            }

            if (GlobalFeatureManager.Instance.IsEnabled <TagsFeature>())
            {
                var tagGroup = cmsGroup.AddPermission(CmsKitAdminPermissions.Tags.Default, L("Permission:TagManagement"));
                tagGroup.AddChild(CmsKitAdminPermissions.Tags.Create, L("Permission:TagManagement.Create"));
                tagGroup.AddChild(CmsKitAdminPermissions.Tags.Update, L("Permission:TagManagement.Update"));
                tagGroup.AddChild(CmsKitAdminPermissions.Tags.Delete, L("Permission:TagManagement.Delete"));
            }

            if (GlobalFeatureManager.Instance.IsEnabled <PagesFeature>())
            {
                var pageManagement = cmsGroup.AddPermission(CmsKitAdminPermissions.Pages.Default, L("Permission:PageManagement"));
                pageManagement.AddChild(CmsKitAdminPermissions.Pages.Create, L("Permission:PageManagement:Create"));
                pageManagement.AddChild(CmsKitAdminPermissions.Pages.Update, L("Permission:PageManagement:Update"));
                pageManagement.AddChild(CmsKitAdminPermissions.Pages.Delete, L("Permission:PageManagement:Delete"));
            }

            if (GlobalFeatureManager.Instance.IsEnabled <BlogsFeature>())
            {
                var blogManagement = cmsGroup.AddPermission(CmsKitAdminPermissions.Blogs.Default, L("Permission:BlogManagement"));
                blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Create, L("Permission:BlogManagement.Create"));
                blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Update, L("Permission:BlogManagement.Update"));
                blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Delete, L("Permission:BlogManagement.Delete"));
                blogManagement.AddChild(CmsKitAdminPermissions.Blogs.Features, L("Permission:BlogManagement.Features"));

                var blogPostManagement = cmsGroup.AddPermission(CmsKitAdminPermissions.BlogPosts.Default, L("Permission:BlogPostManagement"));
                blogPostManagement.AddChild(CmsKitAdminPermissions.BlogPosts.Create, L("Permission:BlogPostManagement.Create"));
                blogPostManagement.AddChild(CmsKitAdminPermissions.BlogPosts.Update, L("Permission:BlogPostManagement.Update"));
                blogPostManagement.AddChild(CmsKitAdminPermissions.BlogPosts.Delete, L("Permission:BlogPostManagement.Delete"));
            }
        }
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(EmployeePermissions.GroupName, L("Permission:Employee"));
 }
Esempio n. 9
0
 public override void Define(IPermissionDefinitionContext context)
 {
     var moduleGroup = context.AddGroup(Permissions.GroupName, L("Permission:SyncJob"));
 }
Esempio n. 10
0
        public override void Define(IPermissionDefinitionContext context)
        {
            var group = context.AddGroup("TestGroup");

            group.AddPermission("MyAuthorizedService1");
        }
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(ProductPermissions.GroupName, L("Permission:Product"));
 }
        public override void Define(IPermissionDefinitionContext context)
        {
            // TODO: 身份认证服务器应该只能主机管辖
            // 增加 MultiTenancySides.Host
            // var identityServerGroup = context.AddGroup(AbpIdentityServerPermissions.GroupName, L("Permissions:IdentityServer"), MultiTenancySides.Host);

            // 与 LINGYUN.Abp.FeatureManagement.Client 模块搭配,这样干可以不依赖于模块优先级
            var identityServerGroup = context.GetGroupOrNull(AbpIdentityServerPermissions.GroupName);

            if (identityServerGroup == null)
            {
                identityServerGroup = context
                                      .AddGroup(
                    name: AbpIdentityServerPermissions.GroupName,
                    displayName: L("Permissions:IdentityServer"),
                    multiTenancySide: MultiTenancySides.Host);
            }
            // 客户端权限
            var clientPermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.Clients.Default, L("Permissions:Clients"), MultiTenancySides.Host);

            clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Create, L("Permissions:Create"), MultiTenancySides.Host);
            clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Update, L("Permissions:Update"), MultiTenancySides.Host);
            clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Clone, L("Permissions:Clone"), MultiTenancySides.Host);
            clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
            clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.ManagePermissions, L("Permissions:ManagePermissions"), MultiTenancySides.Host);
            clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.ManageClaims, L("Permissions:ManageClaims"), MultiTenancySides.Host);
            clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.ManageSecrets, L("Permissions:ManageSecrets"), MultiTenancySides.Host);
            clientPermissions.AddChild(AbpIdentityServerPermissions.Clients.ManageProperties, L("Permissions:ManageProperties"), MultiTenancySides.Host);

            // Api资源权限
            var apiResourcePermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.ApiResources.Default, L("Permissions:ApiResources"), MultiTenancySides.Host);

            apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Create, L("Permissions:Create"), MultiTenancySides.Host);
            apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Update, L("Permissions:Update"), MultiTenancySides.Host);
            apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
            apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.ManageClaims, L("Permissions:ManageClaims"), MultiTenancySides.Host);
            apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.ManageSecrets, L("Permissions:ManageSecrets"), MultiTenancySides.Host);
            apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.ManageScopes, L("Permissions:ManageScopes"), MultiTenancySides.Host);
            apiResourcePermissions.AddChild(AbpIdentityServerPermissions.ApiResources.ManageProperties, L("Permissions:ManageProperties"), MultiTenancySides.Host);

            // Api范围权限
            var apiScopePermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.ApiScopes.Default, L("Permissions:ApiScopes"), MultiTenancySides.Host);

            apiScopePermissions.AddChild(AbpIdentityServerPermissions.ApiScopes.Create, L("Permissions:Create"), MultiTenancySides.Host);
            apiScopePermissions.AddChild(AbpIdentityServerPermissions.ApiScopes.Update, L("Permissions:Update"), MultiTenancySides.Host);
            apiScopePermissions.AddChild(AbpIdentityServerPermissions.ApiScopes.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
            apiScopePermissions.AddChild(AbpIdentityServerPermissions.ApiScopes.ManageClaims, L("Permissions:ManageClaims"), MultiTenancySides.Host);
            apiScopePermissions.AddChild(AbpIdentityServerPermissions.ApiScopes.ManageProperties, L("Permissions:ManageProperties"), MultiTenancySides.Host);

            // 身份资源权限
            var identityResourcePermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.IdentityResources.Default, L("Permissions:IdentityResources"), MultiTenancySides.Host);

            identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Create, L("Permissions:Create"), MultiTenancySides.Host);
            identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Update, L("Permissions:Update"), MultiTenancySides.Host);
            identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
            identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.ManageClaims, L("Permissions:ManageClaims"), MultiTenancySides.Host);
            identityResourcePermissions.AddChild(AbpIdentityServerPermissions.IdentityResources.ManageProperties, L("Permissions:ManageProperties"), MultiTenancySides.Host);

            // 持久授权
            var persistedGrantPermissions = identityServerGroup.AddPermission(AbpIdentityServerPermissions.Grants.Default, L("Permissions:Grants"), MultiTenancySides.Host);

            persistedGrantPermissions.AddChild(AbpIdentityServerPermissions.Grants.Delete, L("Permissions:Delete"), MultiTenancySides.Host);
        }
Esempio n. 13
0
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(ImagesPermissions.GroupName, L("Permission:Images"));
 }
        public override void Define(IPermissionDefinitionContext context)
        {
            var moduleGroup = context.AddGroup(SettingManagementPermissions.GroupName, L("Permission:SettingManagement"));

            moduleGroup.AddPermission(SettingManagementPermissions.EmailSetting, L("Permission:EmailSetting"), multiTenancySide: MultiTenancySides.Host);
        }
Esempio n. 15
0
        public override void Define(IPermissionDefinitionContext context)
        {
            var carParkGroup = context.AddGroup(CarParkABPPermissions.GroupName, L("Permission:CarParkABP"));

            var carParkPermission = carParkGroup.AddPermission(CarParkABPPermissions.CarPark.Default, L("Permission:CarPark"));
        }
        public override void Define(IPermissionDefinitionContext context)
        {
            var permissionGroup = context.AddGroup(
                LocalizationManagementPermissions.GroupName,
                L("Permissions:LocalizationManagement"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);

            var resourcePermission = permissionGroup.AddPermission(
                LocalizationManagementPermissions.Resource.Default,
                L("Permissions:Resource"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);

            resourcePermission.AddChild(
                LocalizationManagementPermissions.Resource.Create,
                L("Permissions:Create"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);
            resourcePermission.AddChild(
                LocalizationManagementPermissions.Resource.Update,
                L("Permissions:Update"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);
            resourcePermission.AddChild(
                LocalizationManagementPermissions.Resource.Delete,
                L("Permissions:Delete"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);

            var languagePermission = permissionGroup.AddPermission(
                LocalizationManagementPermissions.Language.Default,
                L("Permissions:Language"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);

            languagePermission.AddChild(
                LocalizationManagementPermissions.Language.Create,
                L("Permissions:Create"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);
            languagePermission.AddChild(
                LocalizationManagementPermissions.Language.Update,
                L("Permissions:Update"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);
            languagePermission.AddChild(
                LocalizationManagementPermissions.Language.Delete,
                L("Permissions:Delete"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);

            var textPermission = permissionGroup.AddPermission(
                LocalizationManagementPermissions.Text.Default,
                L("Permissions:Text"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);

            textPermission.AddChild(
                LocalizationManagementPermissions.Text.Create,
                L("Permissions:Create"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);
            textPermission.AddChild(
                LocalizationManagementPermissions.Text.Update,
                L("Permissions:Update"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);
            textPermission.AddChild(
                LocalizationManagementPermissions.Text.Delete,
                L("Permissions:Delete"),
                Volo.Abp.MultiTenancy.MultiTenancySides.Host);
        }
Esempio n. 17
0
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(CaptchaPermissions.GroupName, L("Permission:Captcha"));
 }
Esempio n. 18
0
        public override void Define(IPermissionDefinitionContext context)
        {
            var auditLoggingGroup = context.AddGroup(AuditLoggingPermissions.GroupName, L("Permission:AuditLogging"));

            auditLoggingGroup.AddPermission(AuditLoggingPermissions.AuditLogs.Default, L("Permission:AuditLogs"));
        }
        public override void Define(IPermissionDefinitionContext context)
        {
            var identityGroup = context.AddGroup(EmailingPermissions.GroupName, L("Permission:Emailing"));

            identityGroup.AddPermission(EmailingPermissions.SettingManagement, L("Permission:SettingManagement"));
        }
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(UnifiedAuthPermissions.GroupName, L("Permission:UnifiedAuth"));
 }
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(FacCigoPermissions.GroupName, L("Permission:FacCigo"));
 }
Esempio n. 22
0
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(SettingModelPermissions.GroupName, L("Permission:SettingModel"));
 }
Esempio n. 23
0
        public override void Define(IPermissionDefinitionContext context)
        {
            var moduleGroup = context.AddGroup(MoviePermissions.GroupName, L("Permission:Movie"));

            moduleGroup.AddPermission(MoviePermissions.Create, L("Permission:Create"));
        }
Esempio n. 24
0
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(LedgerManagementPermissions.GroupName, L("Permission:LedgerManagement"));
 }
Esempio n. 25
0
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(MyProjectNamePermissions.GroupName, L("Permission:MyProjectName"));
 }
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(ReviewKitPermissions.GroupName, L("Permission:ReviewKit"));
 }
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(LimsPermissions.GroupName);
     //Define your own permissions here. Example:
     //myGroup.AddPermission(LimsPermissions.MyPermission1, L("Permission:MyPermission1"));
 }
Esempio n. 28
0
 public override void Define(IPermissionDefinitionContext context)
 {
     var myGroup = context.AddGroup(FormCustomPermissions.GroupName, L("Permission:FormCustom"));
 }