Esempio n. 1
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)

            var pages  = context.GetPermissionOrNull("Pages") ?? context.CreatePermission("Pages", L("Pages"));
            var group5 = pages.CreateChildPermission("Pages.Group5", L("Group5"));

            //deparment
            var PhongBan = pages.CreateChildPermission(Group5PermissionsConst.Pages_Administration_PhongBan, L("PhongBan"));

            PhongBan.CreateChildPermission(Group5PermissionsConst.Pages_Administration_PhongBan_Delete, L("Delete"));

            //equiment
            var Equipment = pages.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Equipment, L("Equipment"));

            Equipment.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Equipment_Add, L("Create"));
            Equipment.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Equipment_View, L("View"));
            Equipment.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Equipment_Insert, L("Insert"));
            Equipment.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Equipment_GetCode, L("GetCode"));
            Equipment.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Equipment_Approve, L("Approve"));

            //device
            var Device = pages.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Dev, L("Device"));

            Device.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Dev_Add, L("Create"));
            Device.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Dev_Update, L("Edit"));
            Device.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Dev_Delete, L("Delete"));
            Device.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Dev_View, L("View"));
            Device.CreateChildPermission(Group5PermissionsConst.Pages_Administration_Dev_Approve, L("Approve"));
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {

            var pages = context.GetPermissionOrNull("Pages") ?? context.CreatePermission("Pages", "页面");

            List<NameValue> listAll = FindAbpAuthorizeAttributes();
            var authorizationPermission = listAll.Where(e => e.Name.StartsWith("Pages_Authorization")).Where(e=>e.Name.Split('_').Count()==3);
            var authorization = pages.CreateChildPermission("Pages_Authorization", "权限管理");
            foreach (var page in authorizationPermission)
            {
                var pageAuthorization= authorization.CreateChildPermission(page.Name, page.Value);
                var pagePermission = listAll.Where(e => e.Name.StartsWith(page.Name)).Where(e => e.Name.Split('_').Count() == 4);
                foreach (var function in pagePermission)
                {
                    pageAuthorization.CreateChildPermission(function.Name, function.Value);
                }
            }

            var basicPermission = listAll.Where(e => e.Name.StartsWith("Pages_Basic")).Where(e => e.Name.Split('_').Count() == 3);
            var basicauthorization = pages.CreateChildPermission("Pages_Basic", "基础管理");
            foreach (var page in basicPermission)
            {
                var pageAuthorization = basicauthorization.CreateChildPermission(page.Name, page.Value);
                var pagePermission = listAll.Where(e => e.Name.StartsWith(page.Name)).Where(e => e.Name.Split('_').Count() == 4);
                foreach (var function in pagePermission)
                {
                    pageAuthorization.CreateChildPermission(function.Name, function.Value);
                }
            }
           
        }
        private void CreateTenantAdminPermissions(IPermissionDefinitionContext context)
        {
            var administration = context.GetPermissionOrNull(PermissionNames.Tenant.Administration);

            if (administration == null)
            {
                administration = context.CreatePermission(PermissionNames.Tenant.Administration, L("Tenant.Administration")
                                                          ); //leave out MultiTenancySides.Tenant to create permission that is equally valid as for tenant as for host
            }
            //var userManagement = administration.CreateChildPermission("Administration.UserManagement");
            var contentManagement = administration.CreateChildPermission(
                PermissionNames.Tenant.Administration_ContentManagement,
                L("Tenant.ContentManagement"));

            contentManagement.CreateChildPermission(
                PermissionNames.Tenant.Administration_ContentManagement_ListProducts,
                L("Tenant.ListProducts"));

            //var roleManagement = administration.Cre
            var roleManagement =
                administration.CreateChildPermission(PermissionNames.Tenant.Administration_RoleManagement,
                                                     L("Tenant.RoleManagement"));

            var users = administration.CreateChildPermission(PermissionNames.Tenant.Administration_UserManagement,
                                                             L("Tenant.UserManagement"));
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)

            var pages  = context.GetPermissionOrNull("Pages") ?? context.CreatePermission("Pages", L("Pages"));
            var Group8 = pages.CreateChildPermission("Pages.Group8", L("Group8"));


            var ChiTietNhanVien = pages.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ChiTietNhanVien, L("ChiTietNhanVien"));

            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ChiTietNhanVien_ById, L("ById"));
            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ChiTietNhanVien_Insert, L("Insert"));
            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ChiTietNhanVien_Update, L("Update"));
            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ChiTietNhanVien_Delete, L("Delete"));
            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ChiTietNhanVien_Search, L("Search"));
            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ChiTietNhanVien_GetAll, L("GetAll"));

            var ThietBiVatTu = pages.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ThietBiVatTu, L("ThietBiVatTu"));

            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ThietBiVatTu_ById, L("ById"));
            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ThietBiVatTu_Insert, L("Insert"));
            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ThietBiVatTu_Update, L("Update"));
            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ThietBiVatTu_Delete, L("Delete"));
            ChiTietNhanVien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_ThietBiVatTu_GetAll, L("GetAll"));

            var PhuKien = pages.CreateChildPermission(Group8PermissionsConst.Pages_Administration_PhuKien, L("PhuKien"));

            PhuKien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_PhuKien_ById, L("ById"));
            PhuKien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_PhuKien_Insert, L("Insert"));
            PhuKien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_PhuKien_Update, L("Update"));
            PhuKien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_PhuKien_Delete, L("Delete"));
            PhuKien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_PhuKien_Search, L("Search"));
            PhuKien.CreateChildPermission(Group8PermissionsConst.Pages_Administration_PhuKien_GetAll, L("GetAll"));
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //context.CreatePermission(PermissionNames.Pages_Users, L("Users"));
            //context.CreatePermission(PermissionNames.Pages_Roles, L("Roles"));
            //context.CreatePermission(PermissionNames.Pages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);

            var pages = context.GetPermissionOrNull(AppLtmPermissions.Pages) ?? context.CreatePermission(AppLtmPermissions.Pages, L("Pages"));

            var administration = pages.CreateChildPermission(AppLtmPermissions.Pages_Administration, L("Administration"));

            var roles = administration.CreateChildPermission(PermissionNames.Pages_Roles, L("Roles"));

            var users = administration.CreateChildPermission(PermissionNames.Pages_Users, L("Users"));

            var auditLog = administration.CreateChildPermission(PermissionNames.Pages_AuditLog, L("AuditLog"));


            var tenants = administration.CreateChildPermission(PermissionNames.Pages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);

            var parameter = administration.CreateChildPermission(ParameterPermissions.Node, L("Parameter"));

            parameter.CreateChildPermission(ParameterPermissions.Query, L("QueryParameter"));
            parameter.CreateChildPermission(ParameterPermissions.Create, L("CreateParameter"));
            parameter.CreateChildPermission(ParameterPermissions.Edit, L("EditParameter"));
            parameter.CreateChildPermission(ParameterPermissions.Delete, L("DeleteParameter"));
            // parameter.CreateChildPermission(ParameterPermissions.BatchDelete, L("BatchDeleteParameter"));
            // parameter.CreateChildPermission(ParameterPermissions.ExportExcel, L("ExportExcelParameter"));
        }
Esempio n. 6
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            var entityNameModel = context.GetPermissionOrNull(PermissionNames.Pages_Administration) ?? context.CreatePermission(PermissionNames.Pages_Administration, L("Administration"), L("Administration"));


            entityNameModel.CreateChildPermission(PermissionNames.Pages_Users, L("Users"), L("Users"));
            entityNameModel.CreateChildPermission(PermissionNames.Pages_Roles, L("Roles"), L("Roles"));
            //entityNameModel.CreateChildPermission(PermissionNames.Pages_Tenants, L("Tenants"), L("Tenants"), multiTenancySides: MultiTenancySides.Host);

            entityNameModel.CreateChildPermission(CompanyAppPermissions.Company, L("Company"), L("Company"));


            var category = entityNameModel.CreateChildPermission(CategoryAppPermissions.Category, L("Category"), L("Category"));
//            category.CreateChildPermission(CategoryAppPermissions.Category_CreateCategory, L("CreateCategory"), L("CreateCategory"));
//            category.CreateChildPermission(CategoryAppPermissions.Category_EditCategory, L("EditCategory"), L("EditCategory"));
//            category.CreateChildPermission(CategoryAppPermissions.Category_DeleteCategory, L("DeleteCategory"), L("DeleteCategory"));


            var product = entityNameModel.CreateChildPermission(ProductAppPermissions.Product, L("Product"), L("Product"));
//            product.CreateChildPermission(ProductAppPermissions.Product_CreateProduct, L("CreateProduct"), L("CreateProduct"));
//            product.CreateChildPermission(ProductAppPermissions.Product_EditProduct, L("EditProduct"), L("EditProduct"));
//            product.CreateChildPermission(ProductAppPermissions. Product_DeleteProduct, L("DeleteProduct"), L("DeleteProduct"));



            var report = entityNameModel.CreateChildPermission(ReportAppPermissions.Report, L("Report"), L("Report"));
//            report.CreateChildPermission(ReportAppPermissions.Report_CreateReport, L("CreateReport"), L("CreateReport"));
//            report.CreateChildPermission(ReportAppPermissions.Report_EditReport, L("EditReport"), L("EditReport"));
//            report.CreateChildPermission(ReportAppPermissions. Report_DeleteReport, L("DeleteReport"), L("DeleteReport"));

            var seo    = entityNameModel.CreateChildPermission(SeoAppPermissions.Seo, L("Seo"), L("Seo"));
            var banner = entityNameModel.CreateChildPermission(BannerAppPermissions.Banner, L("Banner"), L("Banner"));
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //Common permissions

            var pages = context.GetPermissionOrNull(PermissionNames.Pages);

            if (pages == null)
            {
                pages = context.CreatePermission(PermissionNames.Pages, L("Pages"));
            }

            var users = pages.CreateChildPermission(PermissionNames.Pages_Users, L("Users"));

            users.CreateChildPermission(PermissionNames.Pages_Users_Roles, L("Roles"));

            var authors = pages.CreateChildPermission(PermissionNames.Pages_Authors, L("Authors"));

            var books = authors.CreateChildPermission(PermissionNames.Pages_Authors_Books, L("Books"));

            books.CreateChildPermission(PermissionNames.Pages_Authors_Books_ZhangJie, L("ZhangJie"));

            //Host permissions

            var tenants = pages.CreateChildPermission(PermissionNames.Pages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);
        }
Esempio n. 8
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            // 在这里配置了OrderInfo 的权限。
            var pages = context.GetPermissionOrNull(AppPermissions.Pages) ?? context.CreatePermission(AppPermissions.Pages, L("Pages"));

            var otherCourse
                = pages.Children.FirstOrDefault(p => p.Name == AppPermissions.Pages_OtherCourseModule) ?? pages.CreateChildPermission(AppPermissions.Pages_OtherCourseModule, L("OtherCourseModule"));

            var neteaseOrderPerimission =
                otherCourse.CreateChildPermission(NeteaseOrderInfoPermissions.Node, L("NeteaseOrderInfo"));

            neteaseOrderPerimission.CreateChildPermission(NeteaseOrderInfoPermissions.Query, L("QueryNeteaseOrderInfo"));
            neteaseOrderPerimission.CreateChildPermission(NeteaseOrderInfoPermissions.Edit, L("EditNeteaseOrderInfo"));


            var tencentOrderPermission =
                otherCourse.CreateChildPermission(TencentOrderInfoPermissions.Node, L("TencentOrderInfo"));

            tencentOrderPermission.CreateChildPermission(TencentOrderInfoPermissions.Query, L("QueryTencentOrderInfo"));
            tencentOrderPermission.CreateChildPermission(TencentOrderInfoPermissions.Create, L("CreateTencentOrderInfo"));
            tencentOrderPermission.CreateChildPermission(TencentOrderInfoPermissions.Edit, L("EditTencentOrderInfo"));
            tencentOrderPermission.CreateChildPermission(TencentOrderInfoPermissions.Delete, L("DeleteTencentOrderInfo"));
            tencentOrderPermission.CreateChildPermission(TencentOrderInfoPermissions.BatchDelete, L("BatchDeleteTencentOrderInfo"));
            tencentOrderPermission.CreateChildPermission(TencentOrderInfoPermissions.ExportExcel, L("ExportExcelTencentOrderInfo"));
        }
        public override void Define(IPermissionDefinitionContext context)
        {
            var myGroup = context.AddGroup(MyAbpAppPermissions.GroupName);

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

            var settingUiPage = context.GetPermissionOrNull(SettingUiPermissions.ShowSettingPage);              // Get ShowSettingPage permission

            // group 1
            var systemGroup = settingUiPage.AddChild(System.Default, L("Permission:SettingUi.System"));
            // group 2
            var passwordGroup = systemGroup.AddChild(System.Password.Group2, L("Permission:SettingUi.System.Password"));

            passwordGroup.AddChild(
                System.Password.RequiredLength,
                L("Permission:SettingUi.System.Password.RequiredLength")
                );
            passwordGroup.AddChild(
                System.Password.RequiredUniqueChars,
                L("Permission:SettingUi.System.Password.RequiredUniqueChars")
                );

            // group 1
            var settingExampleGroup = settingUiPage.AddChild(SettingExample.Default, L("Permission:SettingUi.SettingExample"));
            // group 2
            var aSettings = settingExampleGroup.AddChild(SettingExample.ASettings.GroupName, L("Permission:SettingUi.SettingExample.ASettings"));

            aSettings.AddChild(
                SettingExample.ASettings.Setting1,
                L("Permission:SettingUi.SettingExample.ASettings.Setting1")
                );
            var bSettings = settingExampleGroup.AddChild(SettingExample.BSettings.GroupName, L("Permission:SettingUi.SettingExample.BSettings"));
        }
Esempio n. 10
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)

            var pages = context.GetPermissionOrNull(AppPermissions.Pages) ?? context.CreatePermission(AppPermissions.Pages, L("Pages"));

            var administration = pages.CreateChildPermission(AppPermissions.Pages_Administration, L("Administration"));

            var roles = administration.CreateChildPermission(AppPermissions.Pages_Administration_Roles, L("Roles"));

            roles.CreateChildPermission(AppPermissions.Pages_Administration_Roles_Create, L("CreatingNewRole"));
            roles.CreateChildPermission(AppPermissions.Pages_Administration_Roles_Edit, L("EditingRole"));
            roles.CreateChildPermission(AppPermissions.Pages_Administration_Roles_Delete, L("DeletingRole"));

            var users = administration.CreateChildPermission(AppPermissions.Pages_Administration_Users, L("Users"));

            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Create, L("CreatingNewUser"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Edit, L("EditingUser"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Delete, L("DeletingUser"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_ChangePermissions, L("ChangingPermissions"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Impersonation, L("LoginForUsers"));

            var languages = administration.CreateChildPermission(AppPermissions.Pages_Administration_Languages, L("Languages"));

            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Create, L("CreatingNewLanguage"));
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Edit, L("EditingLanguage"));
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Delete, L("DeletingLanguages"));
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_ChangeTexts, L("ChangingTexts"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_AuditLogs, L("AuditLogs"));

            var organizationUnits = administration.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits, L("OrganizationUnits"));

            organizationUnits.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits_ManageOrganizationTree, L("ManagingOrganizationTree"));
            organizationUnits.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits_ManageMembers, L("ManagingMembers"));

            //TENANT-SPECIFIC PERMISSIONS

            pages.CreateChildPermission(AppPermissions.Pages_Tenant_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Tenant);

            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_Settings, L("Settings"), multiTenancySides: MultiTenancySides.Tenant);

            //HOST-SPECIFIC PERMISSIONS

            var editions = pages.CreateChildPermission(AppPermissions.Pages_Editions, L("Editions"), multiTenancySides: MultiTenancySides.Host);

            editions.CreateChildPermission(AppPermissions.Pages_Editions_Create, L("CreatingNewEdition"), multiTenancySides: MultiTenancySides.Host);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_Edit, L("EditingEdition"), multiTenancySides: MultiTenancySides.Host);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_Delete, L("DeletingEdition"), multiTenancySides: MultiTenancySides.Host);

            var tenants = pages.CreateChildPermission(AppPermissions.Pages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);

            tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Create, L("CreatingNewTenant"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Edit, L("EditingTenant"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(AppPermissions.Pages_Tenants_ChangeFeatures, L("ChangingFeatures"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Delete, L("DeletingTenant"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Impersonation, L("LoginForTenants"), multiTenancySides: MultiTenancySides.Host);

            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Settings, L("Settings"), multiTenancySides: MultiTenancySides.Host);
        }
Esempio n. 11
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            var pages  = context.GetPermissionOrNull("Pages") ?? context.CreatePermission("Pages", new FixedLocalizableString("Pages"));
            var mUsers = pages.CreateChildPermission(PlugInZeroConsts.PermissionNames.PlugIns, new FixedLocalizableString("插件测试"));

            mUsers.CreateChildPermission(PlugInZeroConsts.PermissionNames.PlugInZero, new FixedLocalizableString("插件测试子菜单"));
        }
Esempio n. 12
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            var pages = context.GetPermissionOrNull(AbpLearningPermissions.Pages);

            var cloudbooklist = pages.Children.FirstOrDefault(m => m.Name == AbpLearningPermissions.Cloudbooklist)
                                ?? pages.CreateChildPermission(AbpLearningPermissions.Cloudbooklist, L("CloudBookList"), L("CloudBookList Desctiption"));

            var books = cloudbooklist.Children.FirstOrDefault(m => m.Name == AbpLearningPermissions.Book) ?? cloudbooklist.CreateChildPermission(AbpLearningPermissions.Book, L("Book"));

            books.CreateChildPermission(AbpLearningPermissions.Book + AbpLearningPermissions.Action.Query, L("Book Query"), L("Book Query Description"));
            books.CreateChildPermission(AbpLearningPermissions.Book + AbpLearningPermissions.Action.Create, L("Book Create"), L("Book Create Description"));
            books.CreateChildPermission(AbpLearningPermissions.Book + AbpLearningPermissions.Action.Update, L("Book Edit"), L("Book Edit Description"));
            books.CreateChildPermission(AbpLearningPermissions.Book + AbpLearningPermissions.Action.Delete, L("Book Delete"), L("Book Delete Description"));
            books.CreateChildPermission(AbpLearningPermissions.Book + AbpLearningPermissions.Action.BatchdDelete, L("Book BatchDelete"), L("Book BatchDelete Description"));
            books.CreateChildPermission(AbpLearningPermissions.Book + AbpLearningPermissions.Action.ExportExcel, L("Book ExportExcel"), L("Book ExportExcel Description"));

            var bookList = cloudbooklist.Children.FirstOrDefault(m => m.Name == AbpLearningPermissions.Booklist) ?? cloudbooklist.CreateChildPermission(AbpLearningPermissions.Booklist, L("BookList"));

            bookList.CreateChildPermission(AbpLearningPermissions.Booklist + AbpLearningPermissions.Action.Query, L("BookList Query"), L("BookList Query Description"));
            bookList.CreateChildPermission(AbpLearningPermissions.Booklist + AbpLearningPermissions.Action.Create, L("BookList Create"), L("BookList Create Description"));
            bookList.CreateChildPermission(AbpLearningPermissions.Booklist + AbpLearningPermissions.Action.Update, L("BookList Edit"), L("BookList Edit Description"));
            bookList.CreateChildPermission(AbpLearningPermissions.Booklist + AbpLearningPermissions.Action.Delete, L("BookList Delete"), L("BookList Delete Description"));
            bookList.CreateChildPermission(AbpLearningPermissions.Booklist + AbpLearningPermissions.Action.BatchdDelete, L("BookList BatchDelete"), L("BookList BatchDelete Description"));
            bookList.CreateChildPermission(AbpLearningPermissions.Booklist + AbpLearningPermissions.Action.ExportExcel, L("BookList ExportExcel"), L("BookList ExportExcel Description"));
        }
Esempio n. 13
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)

            var pages    = context.GetPermissionOrNull(GWebsitePermissions.Pages) ?? context.CreatePermission(GWebsitePermissions.Pages, L("Pages"));
            var gwebsite = pages.CreateChildPermission(GWebsitePermissions.Pages_Administration_GWebsite, L("GWebsite"));

            var menuClient = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_MenuClient, L("MenuClient"));

            menuClient.CreateChildPermission(GWebsitePermissions.Pages_Administration_MenuClient_Create, L("CreatingNewMenuClient"));
            menuClient.CreateChildPermission(GWebsitePermissions.Pages_Administration_MenuClient_Edit, L("EditingMenuClient"));
            menuClient.CreateChildPermission(GWebsitePermissions.Pages_Administration_MenuClient_Delete, L("DeletingMenuClient"));

            var demoModel = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_DemoModel, L("DemoModel"));

            demoModel.CreateChildPermission(GWebsitePermissions.Pages_Administration_DemoModel_Create, L("CreatingNewDemoModel"));
            demoModel.CreateChildPermission(GWebsitePermissions.Pages_Administration_DemoModel_Edit, L("EditingDemoModel"));
            demoModel.CreateChildPermission(GWebsitePermissions.Pages_Administration_DemoModel_Delete, L("DeletingDemoModel"));

            var customer = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_Customer, L("Customer"));

            customer.CreateChildPermission(GWebsitePermissions.Pages_Administration_Customer_Create, L("CreatingNewCustomer"));
            customer.CreateChildPermission(GWebsitePermissions.Pages_Administration_Customer_Edit, L("EditingCustomer"));
            customer.CreateChildPermission(GWebsitePermissions.Pages_Administration_Customer_Delete, L("DeletingCustomer"));

            var leasedAsset = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_LeasedAsset, L("LeasedAsset"));

            leasedAsset.CreateChildPermission(GWebsitePermissions.Pages_Administration_LeasedAsset_Create, L("CreatingNewLeasedAsset"));
            leasedAsset.CreateChildPermission(GWebsitePermissions.Pages_Administration_LeasedAsset_Edit, L("EditingLeasedAsset"));
            leasedAsset.CreateChildPermission(GWebsitePermissions.Pages_Administration_LeasedAsset_Delete, L("DeletingLeasedAsset"));
        }
Esempio n. 14
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            var pages = context.GetPermissionOrNull(SbsAbpConsts.AppPages) ?? context.CreatePermission(SbsAbpConsts.AppPages, L("后台系统"));

            var zero = pages.CreateChildPermission(ZeroPermissionNames.ZeroPages, L("系统管理"));

            var users = zero.CreateChildPermission(ZeroPermissionNames.ZeroPages_Users, L("用户管理"));

            users.CreateChildPermission(ZeroPermissionNames.ZeroPages_Users_Create, L("新增用户"));
            users.CreateChildPermission(ZeroPermissionNames.ZeroPages_Users_Edit, L("编辑用户"));
            users.CreateChildPermission(ZeroPermissionNames.ZeroPages_Users_Delete, L("删除用户"));
            users.CreateChildPermission(ZeroPermissionNames.ZeroPages_Users_Permission, L("权限设置"));

            var roles = zero.CreateChildPermission(ZeroPermissionNames.ZeroPages_Roles, L("角色管理"));

            roles.CreateChildPermission(ZeroPermissionNames.ZeroPages_Roles_Create, L("新增角色"));
            roles.CreateChildPermission(ZeroPermissionNames.ZeroPages_Roles_Edit, L("编辑角色"));
            roles.CreateChildPermission(ZeroPermissionNames.ZeroPages_Roles_Delete, L("删除角色"));

            var menuTree = zero.CreateChildPermission(ZeroPermissionNames.ZeroPages_MenusTree, L("菜单管理"));

            menuTree.CreateChildPermission(ZeroPermissionNames.ZeroPages_MenusTree_Create, L("新增菜单"));
            menuTree.CreateChildPermission(ZeroPermissionNames.ZeroPages_MenusTree_Edit, L("编辑菜单"));
            menuTree.CreateChildPermission(ZeroPermissionNames.ZeroPages_MenusTree_Delete, L("删除菜单"));

            zero.CreateChildPermission(ZeroPermissionNames.ZeroPages_ThemeSetting, L("主题设置"));
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)

            var pages  = context.GetPermissionOrNull("Pages") ?? context.CreatePermission("Pages", L("Pages"));
            var group6 = pages.CreateChildPermission("Pages.Group6", L("Group6"));


            var donvitinhModels = group6.CreateChildPermission(Group6PermissionsConst.Pages_Administration_DVT, L("DVT"));

            donvitinhModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_DVT_Delete, L("Delete"));

            var douutienModels = group6.CreateChildPermission(Group6PermissionsConst.Pages_Administration_DoUuTien, L("DoUuTien"));

            douutienModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_DoUuTien_Delete, L("Delete"));
            douutienModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_DoUuTien_Create, L("Create"));
            douutienModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_DoUuTien_SearchFilter, L("SearchFilter"));
            douutienModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_DoUuTien_ById, L("ById"));
            douutienModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_DoUuTien_Update, L("Update"));

            var ttycscModels = group6.CreateChildPermission(Group6PermissionsConst.Pages_Administration_TrangThaiYeuCauSuaChua, L("TrangThaiYeuCauSuaChua"));

            ttycscModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_TrangThaiYeuCauSuaChua_Delete, L("Delete"));
            ttycscModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_TrangThaiYeuCauSuaChua_Create, L("Create"));
            ttycscModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_TrangThaiYeuCauSuaChua_SearchFilter, L("SearchFilter"));
            ttycscModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_TrangThaiYeuCauSuaChua_ById, L("ById"));
            ttycscModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_TrangThaiYeuCauSuaChua_Update, L("Update"));
            ttycscModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_TrangThaiYeuCauSuaChua_Approve, L("Approve"));

            //var dasboardYCSCModels = group6.CreateChildPermission(Group6PermissionsConst.Pages_Administration_DashboardYCSC, L("DashboardYCSC"));
            //dasboardYCSCModels.CreateChildPermission(Group6PermissionsConst.Pages_Administration_DashboardYCSC_Statistic, L("Statistic"));
        }
Esempio n. 16
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)

            var pages = context.GetPermissionOrNull(AppPermissions.Pages) ?? context.CreatePermission(AppPermissions.Pages, L("页面"));

            var administration = pages.CreateChildPermission(AppPermissions.Pages_Administration, L("权限管理"));

            var roles = administration.CreateChildPermission(AppPermissions.Pages_Administration_Roles, L("角色"));

            roles.CreateChildPermission(AppPermissions.Pages_Administration_Roles_Create, L("创建角色"));
            roles.CreateChildPermission(AppPermissions.Pages_Administration_Roles_Edit, L("编辑角色"));
            roles.CreateChildPermission(AppPermissions.Pages_Administration_Roles_Delete, L("删除角色"));

            var users = administration.CreateChildPermission(AppPermissions.Pages_Administration_Users, L("用户"));

            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Create, L("创建用户"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Edit, L("编辑用户"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Delete, L("删除用户"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_ChangePermissions, L("修改权限"));


            var auditlogs = pages.CreateChildPermission(AppPermissions.Pages_AuditLogs, L("审计日志"));

            auditlogs.CreateChildPermission(AppPermissions.Pages_AuditLogs_Logs, L("日志信息"));
            auditlogs.CreateChildPermission(AppPermissions.Pages_AuditLogs_Warns, L("报警信息"));

            var operators = pages.CreateChildPermission(AppPermissions.Pages_Operator, L("运营商管理"));
            var tree      = operators.CreateChildPermission(AppPermissions.Pages_Operator_Orgs, L("组织机构树"));

            tree.CreateChildPermission(AppPermissions.Pages_Operator_Orgs_Create, L("创建树"));
            tree.CreateChildPermission(AppPermissions.Pages_Operator_Orgs_Edit, L("编辑树"));
            tree.CreateChildPermission(AppPermissions.Pages_Operator_Orgs_Delete, L("删除树"));
            tree.CreateChildPermission(AppPermissions.Pages_Operator_Orgs_BindPrice, L("绑定价格"));
            tree.CreateChildPermission(AppPermissions.Pages_Operator_Orgs_BindProduct, L("绑定产品"));

            operators.CreateChildPermission(AppPermissions.Pages_Operator_Boxs, L("货道信息"));


            var orders = pages.CreateChildPermission(AppPermissions.Pages_Orders, L("订单信息"));

            orders.CreateChildPermission(AppPermissions.Pages_Orders_OrderList, L("订单列表"));

            var devices = pages.CreateChildPermission(AppPermissions.Pages_Device, L("设备信息"));
            var manage  = devices.CreateChildPermission(AppPermissions.Pages_Device_Manage, L("设备管理"));

            manage.CreateChildPermission(AppPermissions.Pages_Device_Manage_Create, L("创建设备"));
            manage.CreateChildPermission(AppPermissions.Pages_Device_Manage_Edit, L("编辑设备"));
            manage.CreateChildPermission(AppPermissions.Pages_Device_Manage_Delete, L("删除设备"));

            var points  = pages.CreateChildPermission(AppPermissions.Pages_Point, L("点位信息"));
            var pmanage = points.CreateChildPermission(AppPermissions.Pages_Point_Manage, L("点位管理"));
            var view    = points.CreateChildPermission(AppPermissions.Pages_Point_View, L("点位查看"));

            pmanage.CreateChildPermission(AppPermissions.Pages_Point_Manage_Create, L("创建点位"));
            pmanage.CreateChildPermission(AppPermissions.Pages_Point_Manage_Edit, L("编辑点位"));
            pmanage.CreateChildPermission(AppPermissions.Pages_Point_Manage_Delete, L("删除点位"));
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)

            var pages   = context.GetPermissionOrNull("Pages") ?? context.CreatePermission("Pages", L("Pages"));
            var Group15 = pages.CreateChildPermission("Pages.Group15", L("Group15"));

            var donViTinhs = Group15.CreateChildPermission(Group15PermissionsConst.Pages_Administration_DVT, L("DonViTinh"));

            donViTinhs.CreateChildPermission(Group15PermissionsConst.Pages_Administration_DVT_Add, L("Create"));
            donViTinhs.CreateChildPermission(Group15PermissionsConst.Pages_Administration_DVT_Update, L("Update"));
            donViTinhs.CreateChildPermission(Group15PermissionsConst.Pages_Administration_DVT_GetAll, L("GetAll"));
            donViTinhs.CreateChildPermission(Group15PermissionsConst.Pages_Administration_DVT_CreateCode, L("CreateCode"));

            var floorType = Group15.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType, L("FloorType"));

            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_GetAll, L("GetAll"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_GetById, L("GetById"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_Create, L("Create"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_Update, L("Update"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_Search, L("Search"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_Delete, L("Delete"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_ApproveAdd, L("ApproveAdd"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_CancelApproveAdd, L("CancelApproveAdd"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_ApproveUpdate, L("ApproveUpdate"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_CancelApproveUpdate, L("CancelApproveUpdate"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_GetApproveOfId, L("GetApproveOfId"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_ApproveDelete, L("ApproveDelete"));
            floorType.CreateChildPermission(Group15PermissionsConst.Pages_Administration_FloorType_CancelApproveDelete, L("CancelApproveDelete"));

            var floor = Group15.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor, L("Floor"));

            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_GetAll, L("GetAll"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_GetByBuildingId, L("GetByBuildingId"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_GetById, L("GetById"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_Create, L("Create"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_Update, L("Update"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_Delete, L("Delete"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_ApproveAdd, L("ApproveAdd"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_ApproveUpdate, L("ApproveUpdate"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_ApproveDelete, L("ApproveDelete"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_CancelApproveAdd, L("CancelApproveAdd"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_CancelApproveUpdate, L("CancelApproveUpdate"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_CancelApproveDelete, L("CancelApproveDelete"));
            floor.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Floor_GetApproveOfId, L("GetApproveOfId"));

            var apartment = Group15.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Apartment, L("Apartment_"));

            apartment.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Apartment_GetAll, L("GetAll_"));

            var demoModels = pages.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Xe, L("Xe"));

            demoModels.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Xe_Add, L("Create"));
            demoModels.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Xe_Update, L("Edit"));
            demoModels.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Xe_Delete, L("Delete"));
            demoModels.CreateChildPermission(Group15PermissionsConst.Pages_Administration_Xe_Approve, L("Approve"));
        }
        public BuildPage(IPermissionDefinitionContext context, bool isMultiTenancyEnabled)
        {
            var page = context.GetPermissionOrNull(Pages) ?? context.CreatePermission(Pages, L("Pages"));

            Childrens = new List <PageAbstract>();
            Childrens.Add(new Edition(page, isMultiTenancyEnabled));
            Childrens.Add(new Tenant(page, isMultiTenancyEnabled));
            Childrens.Add(new BuildAdministration(page, isMultiTenancyEnabled));
        }
Esempio n. 19
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //Common permissions
            var pages = context.GetPermissionOrNull(PermissionNames.Pages) ??
                        context.CreatePermission(PermissionNames.Pages, L("Pages"));

            //Host permissions
            var tenants = pages.CreateChildPermission(PermissionNames.Pages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);
        }
Esempio n. 20
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            var pageUser = context.CreatePermission(PermissionNames.PagesUsers, L("Users"));

            context.CreatePermission(PermissionNames.PagesRoles, L("Roles"));
            context.CreatePermission(PermissionNames.PagesTenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);

            var pages = context.GetPermissionOrNull(PermissionNames.Pages) ??
                        context.CreatePermission(PermissionNames.Pages);

            // register permission here

            // Permissions for Pages_Users
            CreateManyPermissions(pageUser, new []
            {
                PermissionNames.PagesUsers_Admin,
                PermissionNames.PagesUsers_Create,
                PermissionNames.PagesUsers_Update,
                PermissionNames.PagesUsers_Delete,
                PermissionNames.PagesUsers_GetAll,
                PermissionNames.PagesUsers_GetOne,
                PermissionNames.PagesUsers_Promote,
                PermissionNames.PagesUsers_Relegate
            });

            var certificate = CreatePermission(pageUser, PermissionNames.PagesUsers_Certificate);

            CreateManyPermissions(certificate, new []
            {
                PermissionNames.PagesUsers_Certificate_Upload,
                PermissionNames.PagesUsers_Certificate_DeleteAll,
                PermissionNames.PagesUsers_Certificate_GetAll
            });

            var article = CreatePermission(pageUser, PermissionNames.PagesUsers_Article);

            CreateManyPermissions(article, new []
            {
                PermissionNames.PagesUsers_Article_Create,
                PermissionNames.PagesUsers_Article_Delete,
                PermissionNames.PagesUsers_Article_Update
            });

            var contest = CreatePermission(pageUser, PermissionNames.PagesUsers_Contest);

            CreateManyPermissions(contest, new []
            {
                PermissionNames.PagesUsers_Contest_SignUp
            });

            var problem = CreatePermission(pageUser, PermissionNames.PagesUsers_Problem);

            CreateManyPermissions(problem, new []
            {
                PermissionNames.PagesUsers_Problem_Delete
            });
        }
Esempio n. 21
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)

            Permission pages    = context.GetPermissionOrNull(GWebsitePermissions.Pages) ?? context.CreatePermission(GWebsitePermissions.Pages, L("Pages"));
            Permission gwebsite = pages.CreateChildPermission(GWebsitePermissions.Pages_Administration_GWebsite, L("GWebsite"));

            Permission menuClients = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_OrderPackage, L("MenuClient"));

            menuClients.CreateChildPermission(GWebsitePermissions.Pages_Administration_OrderPackage_Create, L("CreatingNewMenuClient"));
            menuClients.CreateChildPermission(GWebsitePermissions.Pages_Administration_OrderPackage_Edit, L("EditingMenuClient"));
            menuClients.CreateChildPermission(GWebsitePermissions.Pages_Administration_OrderPackage_Delete, L("DeletingMenuClient"));

            //Asset Category
            Permission assetCategories = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_AssetCategory, L("AssetCategory"));

            assetCategories.CreateChildPermission(GWebsitePermissions.Pages_Administration_AssetCategory_Create, L("CreatingAssetCategory"));
            assetCategories.CreateChildPermission(GWebsitePermissions.Pages_Administration_AssetCategory_Edit, L("EditingAssetCategory"));
            assetCategories.CreateChildPermission(GWebsitePermissions.Pages_Administration_AssetCategory_Delete, L("DeletingAssetCategory"));

            //Asset
            Permission asset = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_Asset, L("Asset"));

            asset.CreateChildPermission(GWebsitePermissions.Pages_Administration_Asset_Create, L("CreatingAsset"));
            asset.CreateChildPermission(GWebsitePermissions.Pages_Administration_Asset_Edit, L("EditingAsset"));
            asset.CreateChildPermission(GWebsitePermissions.Pages_Administration_Asset_Delete, L("DeletingAsset"));

            Permission orderPackages = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_MenuClient, L("OrderPackage"));

            orderPackages.CreateChildPermission(GWebsitePermissions.Pages_Administration_MenuClient_Create, L("CreatingNewOrderPackage"));
            orderPackages.CreateChildPermission(GWebsitePermissions.Pages_Administration_MenuClient_Edit, L("EditingOrderPackage"));
            orderPackages.CreateChildPermission(GWebsitePermissions.Pages_Administration_MenuClient_Delete, L("DeletingOrderPackage"));

            Permission videoInstructions = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_VideoInstruction, L("VideoInstruction"));

            videoInstructions.CreateChildPermission(GWebsitePermissions.Pages_Administration_VideoInstruction_Create, L("CreatingNewVideoInstruction"));
            videoInstructions.CreateChildPermission(GWebsitePermissions.Pages_Administration_VideoInstruction_Edit, L("EditingVideoInstruction"));
            videoInstructions.CreateChildPermission(GWebsitePermissions.Pages_Administration_VideoInstruction_Delete, L("DeletingVideoInstruction"));

            Permission VideoInstructionCategories = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_VideoInstructionCategory, L("VideoInstructionCategory"));

            VideoInstructionCategories.CreateChildPermission(GWebsitePermissions.Pages_Administration_VideoInstructionCategory_Create, L("CreatingNewVVideoInstructionCategory"));
            VideoInstructionCategories.CreateChildPermission(GWebsitePermissions.Pages_Administration_VideoInstructionCategory_Edit, L("EditingVideoInstructionCategory"));
            VideoInstructionCategories.CreateChildPermission(GWebsitePermissions.Pages_Administration_VideoInstructionCategory_Delete, L("DeletingVideoInstructionCategory"));

            var departments = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_Department, L("Department"));

            departments.CreateChildPermission(GWebsitePermissions.Pages_Administration_Department_Create, L("CreatingNewDepartment"));
            departments.CreateChildPermission(GWebsitePermissions.Pages_Administration_Department_Edit, L("EditingDepartment"));
            departments.CreateChildPermission(GWebsitePermissions.Pages_Administration_Department_Delete, L("DeletingDepartment"));

            var depreciations = gwebsite.CreateChildPermission(GWebsitePermissions.Pages_Administration_Depreciation, L("Depreciation"));

            depreciations.CreateChildPermission(GWebsitePermissions.Pages_Administration_Depreciation_Create, L("CreatingNewDepreciation"));
            depreciations.CreateChildPermission(GWebsitePermissions.Pages_Administration_Depreciation_Edit, L("EditingDepreciation"));
            depreciations.CreateChildPermission(GWebsitePermissions.Pages_Administration_Depreciation_Delete, L("DeletingDepreciation"));
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //修改权限,增加管理单元默认权限
            var pages          = context.GetPermissionOrNull(PermissionNames.Pages) ?? context.CreatePermission(PermissionNames.Pages, L("Pages"));
            var administration = pages.Children.FirstOrDefault(p => p.Name == PermissionNames.Pages_Administration) ?? pages.CreateChildPermission(PermissionNames.Pages_Administration, L("Administration"));

            administration.CreateChildPermission(PermissionNames.Pages_Users, L("Users"));
            administration.CreateChildPermission(PermissionNames.Pages_Roles, L("Roles"));
            context.CreatePermission(PermissionNames.Pages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            var pages = context.GetPermissionOrNull(PermissionNames.Pages_Blogs) ?? context.CreatePermission(PermissionNames.Pages_Blogs, L("Blogs"));

            pages
            .CreateChildPermission(ArticleAppPermissions.Article, L("Article"))
            .CreateChildPermission(ArticleAppPermissions.Article_CreateArticle, L("CreateArticle"))
            .CreateChildPermission(ArticleAppPermissions.Article_EditArticle, L("EditArticle"))
            .CreateChildPermission(ArticleAppPermissions.Article_DeleteArticle, L("DeleteArticle"));
        }
        public static IPermissionDefinitionContext ConfigGroup4(
            this IPermissionDefinitionContext context)
        {
            var pages = context.GetPermissionOrNull("Pages") ?? context.CreatePermission("Pages", L("Pages"));

            // Thêm quyền mới dưới đây


            return(context);
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)

            var pages = context.GetPermissionOrNull(AppPermissions.Pages) ?? context.CreatePermission(AppPermissions.Pages, L("Pages"));

            var administration = pages.CreateChildPermission(AppPermissions.Pages_Administration, L("Administration"));
            
            var roles = administration.CreateChildPermission(AppPermissions.Pages_Administration_Roles, L("Roles"));
            roles.CreateChildPermission(AppPermissions.Pages_Administration_Roles_Create, L("CreatingNewRole"));
            roles.CreateChildPermission(AppPermissions.Pages_Administration_Roles_Edit, L("EditingRole"));
            roles.CreateChildPermission(AppPermissions.Pages_Administration_Roles_Delete, L("DeletingRole"));
            
            var users = administration.CreateChildPermission(AppPermissions.Pages_Administration_Users, L("Users"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Create, L("CreatingNewUser"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Edit, L("EditingUser"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Delete, L("DeletingUser"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_ChangePermissions, L("ChangingPermissions"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Impersonation, L("LoginForUsers"));

            var languages = administration.CreateChildPermission(AppPermissions.Pages_Administration_Languages, L("Languages"));
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Create, L("CreatingNewLanguage"));
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Edit, L("EditingLanguage"));
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Delete, L("DeletingLanguages"));
            languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_ChangeTexts, L("ChangingTexts"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_AuditLogs, L("AuditLogs"));

            var organizationUnits = administration.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits, L("OrganizationUnits"));
            organizationUnits.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits_ManageOrganizationTree, L("ManagingOrganizationTree"));
            organizationUnits.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits_ManageMembers, L("ManagingMembers"));

            //TENANT-SPECIFIC PERMISSIONS

            pages.CreateChildPermission(AppPermissions.Pages_Tenant_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Tenant);

            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_Settings, L("Settings"), multiTenancySides: MultiTenancySides.Tenant);

            //HOST-SPECIFIC PERMISSIONS

            var editions = pages.CreateChildPermission(AppPermissions.Pages_Editions, L("Editions"), multiTenancySides: MultiTenancySides.Host);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_Create, L("CreatingNewEdition"), multiTenancySides: MultiTenancySides.Host);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_Edit, L("EditingEdition"), multiTenancySides: MultiTenancySides.Host);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_Delete, L("DeletingEdition"), multiTenancySides: MultiTenancySides.Host);

            var tenants = pages.CreateChildPermission(AppPermissions.Pages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Create, L("CreatingNewTenant"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Edit, L("EditingTenant"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(AppPermissions.Pages_Tenants_ChangeFeatures, L("ChangingFeatures"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Delete, L("DeletingTenant"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Impersonation, L("LoginForTenants"), multiTenancySides: MultiTenancySides.Host);

            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Settings, L("Settings"), multiTenancySides: MultiTenancySides.Host);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Maintenance, L("Maintenance"), multiTenancySides: MultiTenancySides.Host);
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            var blogService = context.GetPermissionOrNull(BlogServicePermissions.BlogService)
                              ?? context.CreatePermission(BlogServicePermissions.BlogService, L("BlogService"), multiTenancySides: MultiTenancySides.Tenant);

            var blogs = blogService.CreateChildPermission(BlogServicePermissions.Blogs.Default, L("BlogService.Blogs"), multiTenancySides: MultiTenancySides.Tenant);

            blogs.CreateChildPermission(BlogServicePermissions.Blogs.Create, L("BlogService.Blogs.Permissions.Create"), multiTenancySides: MultiTenancySides.Tenant);
            blogs.CreateChildPermission(BlogServicePermissions.Blogs.Edit, L("BlogService.Blogs.Permissions.Edit"), multiTenancySides: MultiTenancySides.Tenant);
            blogs.CreateChildPermission(BlogServicePermissions.Blogs.Delete, L("BlogService.Blogs.Permissions.Delete"), multiTenancySides: MultiTenancySides.Tenant);
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //Common permissions
            var pages = context.GetPermissionOrNull(PermissionNames.Pages);

            if (pages == null)
            {
                pages = context.CreatePermission(PermissionNames.Pages, L("Pages"));
                //pages.CreateChildPermission
            }
        }
Esempio n. 28
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            // 根节点
            var pages = context.GetPermissionOrNull(DefaultAppConst.Permissions.Pages)
                ?? context.CreatePermission(DefaultAppConst.Permissions.Pages, L(DefaultAppConst.LocalStrings.Pages));

            //动态获取菜单权限
            var navs = _navigationAppService.GetListWithSort();

            GetChilds(navs, pages, 0);
        }
Esempio n. 29
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //Common permissions
            var pages = context.GetPermissionOrNull(PermissionNames.Pages) ??
                        context.CreatePermission(PermissionNames.Pages, L("Pages"));

            var organizationUnits = pages.CreateChildPermission(PermissionNames.PagesSysAdminOrgUnit, L("OrganizationUnits"));

            organizationUnits.CreateChildPermission(PermissionNames.PagesSysAdminOrgUnitEdit, L("OrganizationUnitsEdit"));
            organizationUnits.CreateChildPermission(PermissionNames.PagesSysAdminOrgUnitDelete, L("OrganizationUnitsDelete"));
            organizationUnits.CreateChildPermission(PermissionNames.PagesSysAdminOrgUnitCreate, L("OrganizationUnitsCreate"));
            organizationUnits.CreateChildPermission(PermissionNames.PagesSysAdminOrgUnitAddUser, L("OrganizationUnitsAddUser"));
            organizationUnits.CreateChildPermission(PermissionNames.PagesSysAdminOrgUnitRemoveUser, L("OrganizationUnitsRemoveUser"));

            //Configuration
            var configuration = pages.CreateChildPermission(PermissionNames.PagesSysAdminConfiguration, L("PagesSysAdminConfiguration"));
            //Dashboard
            var dashboard = pages.CreateChildPermission(PermissionNames.PagesDashboard, L("PagesSysAdminDashBoard"));
            //Users
            var users = pages.CreateChildPermission(PermissionNames.PagesSysAdminUsers, L("Users"));

            users.CreateChildPermission(PermissionNames.PagesSysAdminUsersCreate, L("CreateUsers"));
            users.CreateChildPermission(PermissionNames.PagesSysAdminUsersEdit, L("EditUsers"));
            users.CreateChildPermission(PermissionNames.PagesSysAdminUsersDelete, L("DeleteUsers"));

            //Languages
            var languages = pages.CreateChildPermission(PermissionNames.PagesSysAdminLanguages, L("PagesSysAdminLanguages"));

            languages.CreateChildPermission(PermissionNames.PagesSysAdminLanguagesCreate, L("PagesSysAdminLanguagesCreate"));
            languages.CreateChildPermission(PermissionNames.PagesSysAdminLanguagesDelete, L("PagesSysAdminLanguagesDelete"));
            languages.CreateChildPermission(PermissionNames.PagesSysAdminLanguagesChangeTexts, L("PagesSysAdminLanguagesChangeTexts"));

            //Permissions
            var permissions = pages.CreateChildPermission(PermissionNames.PagesSysAdminPermissions, L("PagesSysAdminPermissions"));

            //Roles
            var roles = pages.CreateChildPermission(PermissionNames.PagesSysAdminRoles, L("PagesSysAdminRoles"));

            roles.CreateChildPermission(PermissionNames.PagesSysAdminRolesCreate, L("PagesSysAdminRolesCreate"));
            roles.CreateChildPermission(PermissionNames.PagesSysAdminRolesEdit, L("PagesSysAdminRolesEdit"));
            roles.CreateChildPermission(PermissionNames.PagesSysAdminRolesDelete, L("PagesSysAdminRolesDelete"));
            roles.CreateChildPermission(PermissionNames.PagesSysAdminRolesAssign, L("PagesSysAdminRolesAssignPermissions"));

            //AuditLogs
            var auditLogs = pages.CreateChildPermission(PermissionNames.AuditLogs, L("PagesSysAuditLogs"));
            //Host permissions
            var tenants = pages.CreateChildPermission(PermissionNames.PagesTenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);

            tenants.CreateChildPermission(PermissionNames.PagesTenantsCreate, L("TenantsCreate"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(PermissionNames.PagesTenantsEdit, L("TenantsEdit"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(PermissionNames.PagesTenantsDelete, L("TenantsDelete"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(PermissionNames.PagesTenantsAssignEdition, L("TenantsAssignEdition"), multiTenancySides: MultiTenancySides.Host);
            tenants.CreateChildPermission(PermissionNames.PagesTenantsAssignFeatures, L("TenantsAssignFeature"), multiTenancySides: MultiTenancySides.Host);
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //在这里配置了Person 的权限。

            var pages  = context.GetPermissionOrNull(AppPermissions.Pages) ?? context.CreatePermission(AppPermissions.Pages, L("Pages"));
            var person = pages.CreateChildPermission(PersonAppPermissions.Person, L("Person"));

            person.CreateChildPermission(PersonAppPermissions.Person_CreatePerson, L("CreatePerson"));
            person.CreateChildPermission(PersonAppPermissions.Person_UpdatePerson, L("UpdatePerson"));
            person.CreateChildPermission(PersonAppPermissions.Person_DeletePerson, L("DeletePerson"));
        }
Esempio n. 31
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //Common permissions
            var admin = context.GetPermissionOrNull(PermissionNames.Administration) ?? context.CreatePermission(PermissionNames.Administration, L("Administration"));

            var users = admin.CreateChildPermission(PermissionNames.AdministrationUsers, L("Administration.Users"));

            users.CreateChildPermission(PermissionNames.AdministrationUsersCreate, L("Administration.Users.Create"));
            users.CreateChildPermission(PermissionNames.AdministrationUsersEdit, L("Administration.Users.Edit"));
            users.CreateChildPermission(PermissionNames.AdministrationUsersDelete, L("Administration.Users.Delete"));
        }
Esempio n. 32
0
        public void SetPermissionsWithMouldName(IPermissionDefinitionContext context, string mouldName)
        {
            var data       = _abpPermissionBaseAppService.GetByMoudleName(mouldName);
            var firstNodes = data.Where(r => !r.ParentId.HasValue);

            foreach (var item in firstNodes)
            {
                var permissionNode = context.GetPermissionOrNull(item.Code) ?? context.CreatePermission(item.Code, L(item.DisplayName), null, Abp.MultiTenancy.MultiTenancySides.Host);
                SetPermissionsWithDown(data, item, permissionNode);
            }
        }
Esempio n. 33
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            var entityPermission = context.GetPermissionOrNull(PermissionNames.Pages_Files) ?? context.CreatePermission(PermissionNames.Pages_Files, L("Files"));

            entityPermission.CreateChildPermission(FilePermissions.Query, L("QueryFile"));
            entityPermission.CreateChildPermission(FilePermissions.Create, L("CreateFile"));
            entityPermission.CreateChildPermission(FilePermissions.Edit, L("EditFile"));
            entityPermission.CreateChildPermission(FilePermissions.Delete, L("DeleteFile"));
            entityPermission.CreateChildPermission(FilePermissions.BatchDelete, L("BatchDeleteFile"));
            entityPermission.CreateChildPermission(FilePermissions.ExportExcel, L("ExportExcelFile"));
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //Common permissions
            var pages = context.GetPermissionOrNull(PermissionNames.Pages);
            if (pages == null)
            {
                pages = context.CreatePermission(PermissionNames.Pages, L("Pages"));
            }

            //Host permissions
            var tenants = pages.CreateChildPermission(PermissionNames.Pages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //Get existing root permission group 'Administration'
            var administration = context.GetPermissionOrNull("Abp.Zero.Administration");
            administration.ShouldNotBe(null);

            //Create 'Role management' permission under 'Administration' group
            var roleManegement = administration.CreateChildPermission("Abp.Zero.Administration.RoleManagement", new FixedLocalizableString("Role management"));

            //Create 'Create role' (to be able to create a new role) permission  as child of 'Role management' permission.
            roleManegement.CreateChildPermission("Abp.Zero.Administration.RoleManagement.CreateRole", new FixedLocalizableString("Create role"));
        }
Esempio n. 36
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //系统管理模块
            var pages = context.GetPermissionOrNull(PermissionNames.SystemsManagePages) ?? context.CreatePermission(PermissionNames.SystemsManagePages, L("SystemsManagePages"));

            //租赁方的权限集合添加,需配置为 multiTenancySides: MultiTenancySides.Host
            var tenants = pages.CreateChildPermission(PermissionNames.SystemsManagePages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);
            //租赁方的权限集合添加,需配置为 multiTenancySides: MultiTenancySides.Host
            var editions = pages.CreateChildPermission(PermissionNames.SystemsManagePages_Editions, L("Editions"), multiTenancySides: MultiTenancySides.Host);
            //权限管理菜单
            var administration = pages.CreateChildPermission(PermissionNames.SystemsManagePages_Administration, L("Administration"));
            //用户管理
            var users = administration.CreateChildPermission(PermissionNames.SystemsManagePages_Administration_Users, L("Users"));
            //角色管理
            var roles = administration.CreateChildPermission(PermissionNames.SystemsManagePages_Administration_Roles, L("Roles"));
            //多语言管理
            var languages = administration.CreateChildPermission(PermissionNames.SystemsManagePages_Administration_Languages, L("Languages"));
        }