public override void SetPermissions(IPermissionDefinitionContext context)
 {
     context.CreatePermission("Permission1", new FixedLocalizableString("Permission1"));
     context.CreatePermission("Permission2", new FixedLocalizableString("Permission2"));
     context.CreatePermission("Permission3", new FixedLocalizableString("Permission3"), true);
     context.CreatePermission("Permission4", new FixedLocalizableString("Permission4"), true);
 }
 public override void SetPermissions(IPermissionDefinitionContext context)
 {
     context.CreatePermission("CanAccessAdministrator");
     context.CreatePermission("CanAccessLogistic");
     context.CreatePermission("CanAccessAccounting");
     context.CreatePermission("CanAccessMarketing");
     context.CreatePermission("CanAccessRetailer");
 }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //TODO: Localize (Change FixedLocalizableString to LocalizableString)

            context.CreatePermission("CanCreateQuestions", new FixedLocalizableString("Can create questions"));
            context.CreatePermission("CanDeleteQuestions", new FixedLocalizableString("Can delete questions"));
            context.CreatePermission("CanDeleteAnswers", new FixedLocalizableString("Can delete answers"));
            context.CreatePermission("CanAnswerToQuestions", new FixedLocalizableString("Can answer to questions"), isGrantedByDefault: true);
        }
        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);
                }
            }
           
        }
        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)
        {
            //Create a root permission group for 'Administration' permissions
            var administration = context.CreatePermission("Abp.Zero.Administration", new FixedLocalizableString("Administration"));

            //Create 'User management' permission under 'Administration' group
            var userManagement = administration.CreateChildPermission("Abp.Zero.Administration.UserManagement", new FixedLocalizableString("User management"));

            //Create 'Change permissions' (to be able to change permissions of a user) permission as child of 'User management' permission.
            userManagement.CreateChildPermission("Abp.Zero.Administration.UserManagement.ChangePermissions", new FixedLocalizableString("Change permissions"));
        }
Пример #7
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);
        }
        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);
        }
Пример #9
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"));
        }
Пример #10
0
 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);
 }
        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: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);

            administration.CreateChildPermission(AppPermissions.Pages_Administration_HangfireDashboard, L("HangfireDashboard"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
        }
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            #region 页面

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

            //管理模块

            #region 系统管理

            var manage = pages.CreateChildPermission(PermissionNames.Pages_Manage, L("Manage"));                                         //系统管理
            manage.CreateChildPermission(PermissionNames.Pages_Manage_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host); //租户
            manage.CreateChildPermission(PermissionNames.Pages_Manage_Users, L("Users"));                                                //用户
            manage.CreateChildPermission(PermissionNames.Pages_Manage_Roles, L("Roles"));                                                //角色
            manage.CreateChildPermission(PermissionNames.Pages_Manage_OrganizationUnits, L("OrganizationUnits"));                        //组织
            manage.CreateChildPermission(PermissionNames.Pages_Manage_LeaveOffice, L("LeaveOffice"));                                    //离职
            manage.CreateChildPermission(PermissionNames.Pages_Manage_Sync, L("Sync"));                                                  //用户同步
            manage.CreateChildPermission(PermissionNames.Pages_Manage_RoleAllot, L("RoleAllot"));                                        //角色分配
            manage.CreateChildPermission(PermissionNames.Pages_Manage_UserInfo, L("UserInfo"));                                          //用户信息
            manage.CreateChildPermission(PermissionNames.Pages_Manage_Menus, L("Menus"));                                                //菜单
            #endregion

            #region 个人中心
            var mycenter = pages.CreateChildPermission(PermissionNames.Pages_MyCenter, L("MyCenter"));
            mycenter.CreateChildPermission(PermissionNames.Pages_MyCenter_Attendance, L("Attendance"));   //个人考勤记录
            mycenter.CreateChildPermission(PermissionNames.Pages_MyCenter_QiyeMail, L("QiyeMail"));       //企业邮箱密码
            mycenter.CreateChildPermission(PermissionNames.Pages_MyCenter_EditOA, L("EditOA"));           //企业邮箱密码
            mycenter.CreateChildPermission(PermissionNames.Pages_MyCenter_ProjectShow, L("ProjectShow")); //项目一览
            mycenter.CreateChildPermission(PermissionNames.Pages_MyCenter_FinanceShow, L("FinanceShow")); //财务一览

            #endregion

            #region 提成申报
            var royalty = pages.CreateChildPermission(PermissionNames.Pages_Royalty, L("Royalty"));
            royalty.CreateChildPermission(PermissionNames.Pages_Royalty_Rule, L("Rule"));                     //提成规则
            royalty.CreateChildPermission(PermissionNames.Pages_Royalty_Declare, L("Declare"));               //提成项目申报
            royalty.CreateChildPermission(PermissionNames.Pages_Royalty_Special, L("Special"));               //特殊项目申报
            royalty.CreateChildPermission(PermissionNames.Pages_Royalty_Grant, L("Grant"));                   //提成发放申报
            royalty.CreateChildPermission(PermissionNames.Pages_Royalty_RoyaltyHistory, L("RoyaltyHistory")); //过往提成一览
            #endregion


            #region 财务管控
            var business = pages.CreateChildPermission(PermissionNames.Pages_Business, L("Business"));
            business.CreateChildPermission(PermissionNames.Pages_Business_Orders, L("Orders"));
            business.CreateChildPermission(PermissionNames.Pages_Business_OrdersInvoice, L("OrdersInvoice"));
            business.CreateChildPermission(PermissionNames.Pages_Business_ServiceCharge, L("ServiceCharge"));
            business.CreateChildPermission(PermissionNames.Pages_Business_Margin, L("Margin"));
            business.CreateChildPermission(PermissionNames.Pages_Business_RefundMargin, L("RefundMargin"));
            business.CreateChildPermission(PermissionNames.Pages_Business_BidNotice, L("BidNotice"));//中标通知书审核
            #endregion

            #region 客户管理及立项

            //< !--2019 - 01 - 08 项目管理更名为客户管理-- >
            var projectManage = pages.CreateChildPermission(PermissionNames.Pages_ProjectManage, L("ProjectManage"));
            projectManage.CreateChildPermission(PermissionNames.Pages_ProjectManage_NewProject, L("NewProject"));
            projectManage.CreateChildPermission(PermissionNames.Pages_ProjectManage_BidManage, L("BidManage"));
            projectManage.CreateChildPermission(PermissionNames.Pages_ProjectManage_TrainingManage, L("TrainingManage"));
            projectManage.CreateChildPermission(PermissionNames.Pages_ProjectManage_CustomerFile, L("CustomerFile"));
            #endregion

            #region 文件编制及挂网
            var fileedit = pages.CreateChildPermission(PermissionNames.Pages_FileEdit, L("FileEdit"));
            fileedit.CreateChildPermission(PermissionNames.Pages_FileEdit_ProjectConfirm, L("ProjectConfirm")); //项目立项确认
            fileedit.CreateChildPermission(PermissionNames.Pages_FileEdit_Net, L("Net"));                       //编制及挂网
            fileedit.CreateChildPermission(PermissionNames.Pages_FileEdit_FileAudit, L("FileAudit"));           //文件审核
            #endregion

            #region 项目管理

            var project = pages.CreateChildPermission(PermissionNames.Pages_Project, L("Project"));
            project.CreateChildPermission(PermissionNames.Pages_Project_WinBid, L("WinBid"));               //中标确认及打印
            project.CreateChildPermission(PermissionNames.Pages_Project_Cancel, L("Cancel"));               //项目取消
            project.CreateChildPermission(PermissionNames.Pages_Project_History, L("History"));             //历史项目
            project.CreateChildPermission(PermissionNames.Pages_Project_FileTatol, L("FileTatol"));         //文件汇总
            project.CreateChildPermission(PermissionNames.Pages_Project_ProjectEdit, L("ProjectEdit"));     //项目编辑菜单
            project.CreateChildPermission(PermissionNames.Pages_Project_ProjectNotice, L("ProjectNotice")); //项目公告审查
            #endregion



            #region 电子评标及会务
            var am = pages.CreateChildPermission(PermissionNames.Pages_AM, L("AM"));
            am.CreateChildPermission(PermissionNames.Pages_AM_EBid, L("EBid"));         //电子评标
            am.CreateChildPermission(PermissionNames.Pages_AM_Calendar, L("Calendar")); //开标日历表
            am.CreateChildPermission(PermissionNames.Pages_AM_Meeting, L("Meeting"));   //开标日历表
            #endregion

            #region 公告
            var articles = pages.CreateChildPermission(PermissionNames.Pages_Articles, L("Articles"));
            articles.CreateChildPermission(PermissionNames.Pages_Articles_Issue, L("Issue"));     //招标公告
            articles.CreateChildPermission(PermissionNames.Pages_Articles_Corr, L("Corr"));       //更正公告
            articles.CreateChildPermission(PermissionNames.Pages_Articles_Result, L("Result"));   //结果公告
            articles.CreateChildPermission(PermissionNames.Pages_Articles_Other, L("Other"));     //其他公告
            articles.CreateChildPermission(PermissionNames.Pages_Articles_MyApply, L("MyApply")); //我的报名
            #endregion

            #region 交易平台管理工具
            var trading = pages.CreateChildPermission(PermissionNames.Pages_Trading, L("Trading"));
            trading.CreateChildPermission(PermissionNames.Pages_Trading_Lead, L("Lead"));               //电子竞价项目导入
            trading.CreateChildPermission(PermissionNames.Pages_Trading_OldPlatform, L("OldPlatform")); //旧平台
            trading.CreateChildPermission(PermissionNames.Pages_Trading_NewPlatform, L("NewPlatform")); //新平台
            trading.CreateChildPermission(PermissionNames.Pages_Trading_SExplain, L("SExplain"));       //评标报告更换供应商说明
            #endregion

            #region 专家管理

            var expert = pages.CreateChildPermission(PermissionNames.Pages_Expert, L("Expert")); //专家管理
            expert.CreateChildPermission(PermissionNames.Pages_Expert_Library, L("Library"));    //专家库
            expert.CreateChildPermission(PermissionNames.Pages_Expert_Extract, L("Extract"));    //专家抽取
            expert.CreateChildPermission(PermissionNames.Pages_Expert_Examine, L("Examine"));    //专家审核


            #endregion

            #region 质控中心
            pages.CreateChildPermission(PermissionNames.Pages_ZK, L("ZK"));
            #endregion

            #region 行政模块
            pages.CreateChildPermission(PermissionNames.Pages_ADM, L("ADM"));
            #endregion

            #region 人力模块
            pages.CreateChildPermission(PermissionNames.Pages_HR, L("HR"));
            #endregion

            #region 业务系统后台管理
            pages.CreateChildPermission(PermissionNames.Pages_Report, L("Report"));
            #endregion

            #region 财务模块
            pages.CreateChildPermission(PermissionNames.Pages_FD, L("FD"));
            #endregion

            #region 汇总报表
            pages.CreateChildPermission(PermissionNames.Pages_Gather, L("Gather"));
            #endregion

            #region 工作流模块
            pages.CreateChildPermission(PermissionNames.Pages_Workflow, L("Workflow"));
            #endregion
            #region 集点数据

            pages.CreateChildPermission(PermissionNames.Pages_Point, L("Point"));


            #endregion


            #region 操作
            var operations = context.GetPermissionOrNull(PermissionNames.Operations) ??
                             context.CreatePermission(PermissionNames.Operations, L("Operations"));
            operations.CreateChildPermission(PermissionNames.Operations_NetButton, L("NetButton"));
            operations.CreateChildPermission(PermissionNames.Operations_InvoiceButton, L("InvoiceButton"));


            #endregion
            #endregion
        }
Пример #13
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"));
        }
Пример #14
0
 public override void SetPermissions(IPermissionDefinitionContext context)
 {
     context.CreatePermission("CanAddOrder", new FixedLocalizableString("Can add order"));
 }
        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 Group3 = pages.CreateChildPermission("Pages.Group3", L("Group3"));


            var demoModels = pages.CreateChildPermission(Group3PermissionsConst.Pages_Administration_Branches, L("Branches"));

            demoModels.CreateChildPermission(Group3PermissionsConst.Pages_Administration_Branches_Delete, L("Delete"));

            var group03 = pages.CreateChildPermission(Group3PermissionsConst.Group3, L("Group03"));

            // Buildings
            var Buildings = group03.CreateChildPermission(Group3PermissionsConst.Buildings, L("Buildings"));

            Buildings.CreateChildPermission(Group3PermissionsConst.Buildings_Create, L("Create"));
            Buildings.CreateChildPermission(Group3PermissionsConst.Buildings_Update, L("Update"));
            Buildings.CreateChildPermission(Group3PermissionsConst.Buildings_Delete, L("Delete"));
            Buildings.CreateChildPermission(Group3PermissionsConst.Buildings_Approve, L("Approve"));

            // Floors
            var Floors = group03.CreateChildPermission(Group3PermissionsConst.Floors, L("Floors"));

            Floors.CreateChildPermission(Group3PermissionsConst.Floors_Create, L("Create"));
            Floors.CreateChildPermission(Group3PermissionsConst.Floors_Update, L("Update"));
            Floors.CreateChildPermission(Group3PermissionsConst.Floors_Delete, L("Delete"));
            Floors.CreateChildPermission(Group3PermissionsConst.Floors_Approve, L("Approve"));

            // Apartments
            var Apartments = group03.CreateChildPermission(Group3PermissionsConst.Apartments, L("Apartments"));

            Apartments.CreateChildPermission(Group3PermissionsConst.Apartments_Create, L("Create"));
            Apartments.CreateChildPermission(Group3PermissionsConst.Apartments_Update, L("Update"));
            Apartments.CreateChildPermission(Group3PermissionsConst.Apartments_Delete, L("Delete"));
            Apartments.CreateChildPermission(Group3PermissionsConst.Apartments_Approve, L("Approve"));

            // Residents
            var Residents = group03.CreateChildPermission(Group3PermissionsConst.Residents, L("Residents"));

            Residents.CreateChildPermission(Group3PermissionsConst.Residents_Create, L("Create"));
            Residents.CreateChildPermission(Group3PermissionsConst.Residents_Update, L("Update"));
            Residents.CreateChildPermission(Group3PermissionsConst.Residents_Delete, L("Delete"));
            Residents.CreateChildPermission(Group3PermissionsConst.Residents_Approve, L("Approve"));

            // Contracts
            var Contracts = group03.CreateChildPermission(Group3PermissionsConst.Contracts, L("Contracts"));

            Contracts.CreateChildPermission(Group3PermissionsConst.Contracts_Create, L("Create"));
            Contracts.CreateChildPermission(Group3PermissionsConst.Contracts_Update, L("Update"));
            Contracts.CreateChildPermission(Group3PermissionsConst.Contracts_Delete, L("Delete"));
            Contracts.CreateChildPermission(Group3PermissionsConst.Contracts_Approve, L("Approve"));

            // ContractDetails
            var ContractDetails = group03.CreateChildPermission(Group3PermissionsConst.ContractDetails, L("ContractDetails"));

            ContractDetails.CreateChildPermission(Group3PermissionsConst.ContractDetails_Create, L("Create"));
            ContractDetails.CreateChildPermission(Group3PermissionsConst.ContractDetails_Update, L("Update"));
            ContractDetails.CreateChildPermission(Group3PermissionsConst.ContractDetails_Delete, L("Delete"));
            ContractDetails.CreateChildPermission(Group3PermissionsConst.ContractDetails_Approve, L("Approve"));

            // EnumeratedTypes
            var EnumeratedTypes = group03.CreateChildPermission(Group3PermissionsConst.EnumeratedTypes, L("EnumeratedTypes"));

            EnumeratedTypes.CreateChildPermission(Group3PermissionsConst.EnumeratedTypes_Create, L("Create"));
            EnumeratedTypes.CreateChildPermission(Group3PermissionsConst.EnumeratedTypes_Delete, L("Delete"));
        }
 public override void SetPermissions(IPermissionDefinitionContext context)
 {
     var rootPermission = PermissionInfos.First(p => p.ParentName == "无");
     var permission = context.CreatePermission(rootPermission.Name, new FixedLocalizableString(rootPermission.DisplayName), rootPermission.IsGrantedByDefault);
     AddPermissions(rootPermission, permission);
 }
 public override void SetPermissions(IPermissionDefinitionContext context)
 {
     context.CreatePermission(DynamicEntityParametersTestBase.TestPermission,
                              new FixedLocalizableString(DynamicEntityParametersTestBase.TestPermission));
 }
Пример #18
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            // 在这里配置了Pages 的权限。
            var pages           = context.GetPermissionOrNull(AppPermissions.Pages) ?? context.CreatePermission(AppPermissions.Pages, L("Pages"));
            var marketingModule = pages.Children.FirstOrDefault(p => p.Name == AppPermissions.Pages_MarketingModule) ?? pages.CreateChildPermission(AppPermissions.Pages_MarketingModule, L("MarketingModule"));


            var entityPermission = marketingModule.CreateChildPermission(UserDownloadConfigPermissions.Node, L("UserDownloadConfig"));

            entityPermission.CreateChildPermission(UserDownloadConfigPermissions.Query, L("QueryUserDownloadConfig"));
            entityPermission.CreateChildPermission(UserDownloadConfigPermissions.Create, L("CreateUserDownloadConfig"));
            entityPermission.CreateChildPermission(UserDownloadConfigPermissions.Edit, L("EditUserDownloadConfig"));
            entityPermission.CreateChildPermission(UserDownloadConfigPermissions.Delete, L("DeleteUserDownloadConfig"));
            entityPermission.CreateChildPermission(UserDownloadConfigPermissions.BatchDelete, L("BatchDeleteUserDownloadConfig"));
            entityPermission.CreateChildPermission(UserDownloadConfigPermissions.ExportExcel, L("ExportExcelUserDownloadConfig"));
            marketingModule.CreateChildPermission(DownloadLogPermissions.Node, L("DownloadLog"));
        }
Пример #19
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 quanLyTrucTiepPNPs = pages.CreateChildPermission(AppPermissions.Pages_QuanLyTrucTiepPNPs, L("QuanLyTrucTiepPNPs"), multiTenancySides: MultiTenancySides.Host);

            quanLyTrucTiepPNPs.CreateChildPermission(AppPermissions.Pages_QuanLyTrucTiepPNPs_Create, L("CreateNewQuanLyTrucTiepPNP"), multiTenancySides: MultiTenancySides.Host);
            quanLyTrucTiepPNPs.CreateChildPermission(AppPermissions.Pages_QuanLyTrucTiepPNPs_Edit, L("EditQuanLyTrucTiepPNP"), multiTenancySides: MultiTenancySides.Host);
            quanLyTrucTiepPNPs.CreateChildPermission(AppPermissions.Pages_QuanLyTrucTiepPNPs_Delete, L("DeleteQuanLyTrucTiepPNP"), multiTenancySides: MultiTenancySides.Host);



            var quanLyNghiPheps = pages.CreateChildPermission(AppPermissions.Pages_QuanLyNghiPheps, L("QuanLyNghiPheps"), multiTenancySides: MultiTenancySides.Host);

            quanLyNghiPheps.CreateChildPermission(AppPermissions.Pages_QuanLyNghiPheps_Create, L("CreateNewQuanLyNghiPhep"), multiTenancySides: MultiTenancySides.Host);
            quanLyNghiPheps.CreateChildPermission(AppPermissions.Pages_QuanLyNghiPheps_Edit, L("EditQuanLyNghiPhep"), multiTenancySides: MultiTenancySides.Host);
            quanLyNghiPheps.CreateChildPermission(AppPermissions.Pages_QuanLyNghiPheps_Delete, L("DeleteQuanLyNghiPhep"), multiTenancySides: MultiTenancySides.Host);
            quanLyNghiPheps.CreateChildPermission(AppPermissions.Pages_QuanLyNghiPheps_Approve, L("Approve"), multiTenancySides: MultiTenancySides.Host);
            quanLyNghiPheps.CreateChildPermission(AppPermissions.Pages_QuanLyNghiPheps_Import, L("Import"), multiTenancySides: MultiTenancySides.Host);
            quanLyNghiPheps.CreateChildPermission(AppPermissions.Pages_QuanLyNghiPheps_Export, L("Export"), multiTenancySides: MultiTenancySides.Host);



            var dataChamCongs = pages.CreateChildPermission(AppPermissions.Pages_DataChamCongs, L("DataChamCongs"), multiTenancySides: MultiTenancySides.Host);

            dataChamCongs.CreateChildPermission(AppPermissions.Pages_DataChamCongs_Create, L("CreateNewDataChamCong"), multiTenancySides: MultiTenancySides.Host);
            dataChamCongs.CreateChildPermission(AppPermissions.Pages_DataChamCongs_Edit, L("EditDataChamCong"), multiTenancySides: MultiTenancySides.Host);
            dataChamCongs.CreateChildPermission(AppPermissions.Pages_DataChamCongs_Delete, L("DeleteDataChamCong"), multiTenancySides: MultiTenancySides.Host);



            var quyTrinhCongTacs = pages.CreateChildPermission(AppPermissions.Pages_QuyTrinhCongTacs, L("QuyTrinhCongTacs"), multiTenancySides: MultiTenancySides.Host);

            quyTrinhCongTacs.CreateChildPermission(AppPermissions.Pages_QuyTrinhCongTacs_Create, L("CreateNewQuyTrinhCongTac"), multiTenancySides: MultiTenancySides.Host);
            quyTrinhCongTacs.CreateChildPermission(AppPermissions.Pages_QuyTrinhCongTacs_Edit, L("EditQuyTrinhCongTac"), multiTenancySides: MultiTenancySides.Host);
            quyTrinhCongTacs.CreateChildPermission(AppPermissions.Pages_QuyTrinhCongTacs_Delete, L("DeleteQuyTrinhCongTac"), multiTenancySides: MultiTenancySides.Host);



            var lichSuUploads = pages.CreateChildPermission(AppPermissions.Pages_LichSuUploads, L("LichSuUploads"), multiTenancySides: MultiTenancySides.Host);

            lichSuUploads.CreateChildPermission(AppPermissions.Pages_LichSuUploads_Create, L("CreateNewLichSuUpload"), multiTenancySides: MultiTenancySides.Host);
            lichSuUploads.CreateChildPermission(AppPermissions.Pages_LichSuUploads_Edit, L("EditLichSuUpload"), multiTenancySides: MultiTenancySides.Host);
            lichSuUploads.CreateChildPermission(AppPermissions.Pages_LichSuUploads_Delete, L("DeleteLichSuUpload"), multiTenancySides: MultiTenancySides.Host);



            //var viTriCongViecs = pages.CreateChildPermission(AppPermissions.Pages_ViTriCongViecs, L("ViTriCongViecs"), multiTenancySides: MultiTenancySides.Host);
            //viTriCongViecs.CreateChildPermission(AppPermissions.Pages_ViTriCongViecs_Create, L("CreateNewViTriCongViec"), multiTenancySides: MultiTenancySides.Host);
            //viTriCongViecs.CreateChildPermission(AppPermissions.Pages_ViTriCongViecs_Edit, L("EditViTriCongViec"), multiTenancySides: MultiTenancySides.Host);
            //viTriCongViecs.CreateChildPermission(AppPermissions.Pages_ViTriCongViecs_Delete, L("DeleteViTriCongViec"), multiTenancySides: MultiTenancySides.Host);



            var configEmails = pages.CreateChildPermission(AppPermissions.Pages_ConfigEmails, L("ConfigEmails"), multiTenancySides: MultiTenancySides.Host);

            configEmails.CreateChildPermission(AppPermissions.Pages_ConfigEmails_Create, L("CreateNewConfigEmail"), multiTenancySides: MultiTenancySides.Host);
            configEmails.CreateChildPermission(AppPermissions.Pages_ConfigEmails_Edit, L("EditConfigEmail"), multiTenancySides: MultiTenancySides.Host);
            configEmails.CreateChildPermission(AppPermissions.Pages_ConfigEmails_Delete, L("DeleteConfigEmail"), multiTenancySides: MultiTenancySides.Host);



            //var Pages_QLTD = pages.CreateChildPermission(AppPermissions.Pages_QLTD, L("Pages_QLTD"), multiTenancySides: MultiTenancySides.Host);
            //var Pages_QuanTri = pages.CreateChildPermission(AppPermissions.Pages_QuanTri, L("Pages_QuanTri"), multiTenancySides: MultiTenancySides.Host);
            //var Pages_QuanTriCot = pages.CreateChildPermission(AppPermissions.Pages_QuanTriCot, L("Pages_QuanTriCot"), multiTenancySides: MultiTenancySides.Host);
            //var Pages_HTQT = pages.CreateChildPermission(AppPermissions.Pages_HTQT, L("Pages_HTQT"), multiTenancySides: MultiTenancySides.Host);


            var syS_PREFIXs = pages.CreateChildPermission(AppPermissions.Pages_SYS_PREFIXs, L("SYS_PREFIXs"), multiTenancySides: MultiTenancySides.Host);

            syS_PREFIXs.CreateChildPermission(AppPermissions.Pages_SYS_PREFIXs_Create, L("CreateNewSYS_PREFIX"), multiTenancySides: MultiTenancySides.Host);
            syS_PREFIXs.CreateChildPermission(AppPermissions.Pages_SYS_PREFIXs_Edit, L("EditSYS_PREFIX"), multiTenancySides: MultiTenancySides.Host);
            syS_PREFIXs.CreateChildPermission(AppPermissions.Pages_SYS_PREFIXs_Delete, L("DeleteSYS_PREFIX"), multiTenancySides: MultiTenancySides.Host);



            var syS_CODEMASTERSs = pages.CreateChildPermission(AppPermissions.Pages_SYS_CODEMASTERSs, L("SYS_CODEMASTERSs"), multiTenancySides: MultiTenancySides.Host);

            syS_CODEMASTERSs.CreateChildPermission(AppPermissions.Pages_SYS_CODEMASTERSs_Create, L("CreateNewSYS_CODEMASTERS"), multiTenancySides: MultiTenancySides.Host);
            syS_CODEMASTERSs.CreateChildPermission(AppPermissions.Pages_SYS_CODEMASTERSs_Edit, L("EditSYS_CODEMASTERS"), multiTenancySides: MultiTenancySides.Host);
            syS_CODEMASTERSs.CreateChildPermission(AppPermissions.Pages_SYS_CODEMASTERSs_Delete, L("DeleteSYS_CODEMASTERS"), multiTenancySides: MultiTenancySides.Host);



            var hoSos = pages.CreateChildPermission(AppPermissions.Pages_HoSos, L("HoSos"), multiTenancySides: MultiTenancySides.Host);

            hoSos.CreateChildPermission(AppPermissions.Pages_HoSos_Create, L("CreateNewHoSo"), multiTenancySides: MultiTenancySides.Host);
            hoSos.CreateChildPermission(AppPermissions.Pages_HoSos_Edit, L("EditHoSo"), multiTenancySides: MultiTenancySides.Host);
            hoSos.CreateChildPermission(AppPermissions.Pages_HoSos_Delete, L("DeleteHoSo"), multiTenancySides: MultiTenancySides.Host);
            hoSos.CreateChildPermission(AppPermissions.Pages_HoSos_Approve, L("Approve"), multiTenancySides: MultiTenancySides.Host);
            hoSos.CreateChildPermission(AppPermissions.Pages_HoSos_Import, L("Import"), multiTenancySides: MultiTenancySides.Host);
            hoSos.CreateChildPermission(AppPermissions.Pages_HoSos_Export, L("Export"), multiTenancySides: MultiTenancySides.Host);



            var hopDongs = pages.CreateChildPermission(AppPermissions.Pages_HopDongs, L("HopDongs"), multiTenancySides: MultiTenancySides.Host);

            hopDongs.CreateChildPermission(AppPermissions.Pages_HopDongs_Create, L("CreateNewHopDong"), multiTenancySides: MultiTenancySides.Host);
            hopDongs.CreateChildPermission(AppPermissions.Pages_HopDongs_Edit, L("EditHopDong"), multiTenancySides: MultiTenancySides.Host);
            hopDongs.CreateChildPermission(AppPermissions.Pages_HopDongs_Delete, L("DeleteHopDong"), multiTenancySides: MultiTenancySides.Host);
            hopDongs.CreateChildPermission(AppPermissions.Pages_HopDongs_Approve, L("Approve"), multiTenancySides: MultiTenancySides.Host);
            hopDongs.CreateChildPermission(AppPermissions.Pages_HopDongs_Import, L("Import"), multiTenancySides: MultiTenancySides.Host);
            hopDongs.CreateChildPermission(AppPermissions.Pages_HopDongs_Export, L("Export"), multiTenancySides: MultiTenancySides.Host);



            var ungViens = pages.CreateChildPermission(AppPermissions.Pages_UngViens, L("UngViens"), multiTenancySides: MultiTenancySides.Host);

            ungViens.CreateChildPermission(AppPermissions.Pages_UngViens_Create, L("CreateNewUngVien"), multiTenancySides: MultiTenancySides.Host);
            ungViens.CreateChildPermission(AppPermissions.Pages_UngViens_Edit, L("EditUngVien"), multiTenancySides: MultiTenancySides.Host);
            ungViens.CreateChildPermission(AppPermissions.Pages_UngViens_Delete, L("DeleteUngVien"), multiTenancySides: MultiTenancySides.Host);
            ungViens.CreateChildPermission(AppPermissions.Pages_UngViens_Approve, L("Approve"), multiTenancySides: MultiTenancySides.Host);
            ungViens.CreateChildPermission(AppPermissions.Pages_UngViens_Import, L("Import"), multiTenancySides: MultiTenancySides.Host);
            ungViens.CreateChildPermission(AppPermissions.Pages_UngViens_Export, L("Export"), multiTenancySides: MultiTenancySides.Host);

            var dangKyKCBs = pages.CreateChildPermission(AppPermissions.Pages_DangKyKCBs, L("DangKyKCBs"), multiTenancySides: MultiTenancySides.Host);

            dangKyKCBs.CreateChildPermission(AppPermissions.Pages_DangKyKCBs_Create, L("CreateNewDangKyKCB"), multiTenancySides: MultiTenancySides.Host);
            dangKyKCBs.CreateChildPermission(AppPermissions.Pages_DangKyKCBs_Edit, L("EditDangKyKCB"), multiTenancySides: MultiTenancySides.Host);
            dangKyKCBs.CreateChildPermission(AppPermissions.Pages_DangKyKCBs_Delete, L("DeleteDangKyKCB"), multiTenancySides: MultiTenancySides.Host);



            var lichSuLamViecs = pages.CreateChildPermission(AppPermissions.Pages_LichSuLamViecs, L("LichSuLamViecs"), multiTenancySides: MultiTenancySides.Host);

            lichSuLamViecs.CreateChildPermission(AppPermissions.Pages_LichSuLamViecs_Create, L("CreateNewLichSuLamViec"), multiTenancySides: MultiTenancySides.Host);
            lichSuLamViecs.CreateChildPermission(AppPermissions.Pages_LichSuLamViecs_Edit, L("EditLichSuLamViec"), multiTenancySides: MultiTenancySides.Host);
            lichSuLamViecs.CreateChildPermission(AppPermissions.Pages_LichSuLamViecs_Delete, L("DeleteLichSuLamViec"), multiTenancySides: MultiTenancySides.Host);



            var tinhThanhs = pages.CreateChildPermission(AppPermissions.Pages_TinhThanhs, L("TinhThanhs"), multiTenancySides: MultiTenancySides.Host);

            tinhThanhs.CreateChildPermission(AppPermissions.Pages_TinhThanhs_Create, L("CreateNewTinhThanh"), multiTenancySides: MultiTenancySides.Host);
            tinhThanhs.CreateChildPermission(AppPermissions.Pages_TinhThanhs_Edit, L("EditTinhThanh"), multiTenancySides: MultiTenancySides.Host);
            tinhThanhs.CreateChildPermission(AppPermissions.Pages_TinhThanhs_Delete, L("DeleteTinhThanh"), multiTenancySides: MultiTenancySides.Host);



            var truongGiaoDichs = pages.CreateChildPermission(AppPermissions.Pages_TruongGiaoDichs, L("TruongGiaoDichs"), multiTenancySides: MultiTenancySides.Host);

            truongGiaoDichs.CreateChildPermission(AppPermissions.Pages_TruongGiaoDichs_Create, L("CreateNewTruongGiaoDich"), multiTenancySides: MultiTenancySides.Host);
            truongGiaoDichs.CreateChildPermission(AppPermissions.Pages_TruongGiaoDichs_Edit, L("EditTruongGiaoDich"), multiTenancySides: MultiTenancySides.Host);
            truongGiaoDichs.CreateChildPermission(AppPermissions.Pages_TruongGiaoDichs_Delete, L("DeleteTruongGiaoDich"), multiTenancySides: MultiTenancySides.Host);



            var noiDaoTaos = pages.CreateChildPermission(AppPermissions.Pages_NoiDaoTaos, L("NoiDaoTaos"), multiTenancySides: MultiTenancySides.Host);

            noiDaoTaos.CreateChildPermission(AppPermissions.Pages_NoiDaoTaos_Create, L("CreateNewNoiDaoTao"), multiTenancySides: MultiTenancySides.Host);
            noiDaoTaos.CreateChildPermission(AppPermissions.Pages_NoiDaoTaos_Edit, L("EditNoiDaoTao"), multiTenancySides: MultiTenancySides.Host);
            noiDaoTaos.CreateChildPermission(AppPermissions.Pages_NoiDaoTaos_Delete, L("Delete.NoiDaoTao"), multiTenancySides: MultiTenancySides.Host);



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

            var masterLists = administration.CreateChildPermission(AppPermissions.Pages_Administration_MasterLists, L("MasterLists"), multiTenancySides: MultiTenancySides.Host);

            masterLists.CreateChildPermission(AppPermissions.Pages_Administration_MasterLists_Create, L("CreateNewMasterList"), multiTenancySides: MultiTenancySides.Host);
            masterLists.CreateChildPermission(AppPermissions.Pages_Administration_MasterLists_Edit, L("EditMasterList"), multiTenancySides: MultiTenancySides.Host);
            masterLists.CreateChildPermission(AppPermissions.Pages_Administration_MasterLists_Delete, L("DeleteMasterList"), multiTenancySides: MultiTenancySides.Host);



            var templates = administration.CreateChildPermission(AppPermissions.Pages_Administration_Templates, L("Templates"), multiTenancySides: MultiTenancySides.Host);

            templates.CreateChildPermission(AppPermissions.Pages_Administration_Templates_Create, L("CreateNewTemplate"), multiTenancySides: MultiTenancySides.Host);
            templates.CreateChildPermission(AppPermissions.Pages_Administration_Templates_Edit, L("EditTemplate"), multiTenancySides: MultiTenancySides.Host);
            templates.CreateChildPermission(AppPermissions.Pages_Administration_Templates_Delete, L("DeleteTemplate"), multiTenancySides: MultiTenancySides.Host);



            //var dynamicActions = administration.CreateChildPermission(AppPermissions.Pages_Administration_DynamicActions, L("DynamicActions"));
            //dynamicActions.CreateChildPermission(AppPermissions.Pages_Administration_DynamicActions_Create, L("CreateNewDynamicAction"));
            //dynamicActions.CreateChildPermission(AppPermissions.Pages_Administration_DynamicActions_Edit, L("EditDynamicAction"));
            //dynamicActions.CreateChildPermission(AppPermissions.Pages_Administration_DynamicActions_Delete, L("DeleteDynamicAction"));



            var roleMappers = administration.CreateChildPermission(AppPermissions.Pages_Administration_RoleMappers, L("RoleMappers"));

            roleMappers.CreateChildPermission(AppPermissions.Pages_Administration_RoleMappers_Create, L("CreateNewRoleMapper"));
            roleMappers.CreateChildPermission(AppPermissions.Pages_Administration_RoleMappers_Edit, L("EditRoleMapper"));
            roleMappers.CreateChildPermission(AppPermissions.Pages_Administration_RoleMappers_Delete, L("DeleteRoleMapper"));


            //var keywordDetails = pages.CreateChildPermission(AppPermissions.Pages_KeywordDetails, L("KeywordDetails"));
            //keywordDetails.CreateChildPermission(AppPermissions.Pages_KeywordDetails_Create, L("CreateNewKeywordDetail"));
            //keywordDetails.CreateChildPermission(AppPermissions.Pages_KeywordDetails_Edit, L("EditKeywordDetail"));
            //keywordDetails.CreateChildPermission(AppPermissions.Pages_KeywordDetails_Delete, L("DeleteKeywordDetail"));



            //var documentStatuses = pages.CreateChildPermission(AppPermissions.Pages_DocumentStatuses, L("DocumentStatuses"));
            //documentStatuses.CreateChildPermission(AppPermissions.Pages_DocumentStatuses_Create, L("CreateNewDocumentStatus"));
            //documentStatuses.CreateChildPermission(AppPermissions.Pages_DocumentStatuses_Edit, L("EditDocumentStatus"));
            //documentStatuses.CreateChildPermission(AppPermissions.Pages_DocumentStatuses_Delete, L("DeleteDocumentStatus"));



            //var memorize_Keywordses = pages.CreateChildPermission(AppPermissions.Pages_Memorize_Keywordses, L("Memorize_Keywordses"));
            //memorize_Keywordses.CreateChildPermission(AppPermissions.Pages_Memorize_Keywordses_Create, L("CreateNewMemorize_Keywords"));
            //memorize_Keywordses.CreateChildPermission(AppPermissions.Pages_Memorize_Keywordses_Edit, L("EditMemorize_Keywords"));
            //memorize_Keywordses.CreateChildPermission(AppPermissions.Pages_Memorize_Keywordses_Delete, L("DeleteMemorize_Keywords"));



            //var textBooks = pages.CreateChildPermission(AppPermissions.Pages_TextBooks, L("TextBooks"));
            //textBooks.CreateChildPermission(AppPermissions.Pages_TextBooks_Create, L("CreateNewTextBook"));
            //textBooks.CreateChildPermission(AppPermissions.Pages_TextBooks_Edit, L("EditTextBook"));
            //textBooks.CreateChildPermission(AppPermissions.Pages_TextBooks_Delete, L("DeleteTextBook"));



            //var priorities = pages.CreateChildPermission(AppPermissions.Pages_Priorities, L("Priorities"));
            //priorities.CreateChildPermission(AppPermissions.Pages_Priorities_Create, L("CreateNewPriority"));
            //priorities.CreateChildPermission(AppPermissions.Pages_Priorities_Edit, L("EditPriority"));
            //priorities.CreateChildPermission(AppPermissions.Pages_Priorities_Delete, L("DeletePriority"));



            //var storeDatasources = pages.CreateChildPermission(AppPermissions.Pages_StoreDatasources, L("StoreDatasources"));
            //storeDatasources.CreateChildPermission(AppPermissions.Pages_StoreDatasources_Create, L("CreateNewStoreDatasource"));
            //storeDatasources.CreateChildPermission(AppPermissions.Pages_StoreDatasources_Edit, L("EditStoreDatasource"));
            //storeDatasources.CreateChildPermission(AppPermissions.Pages_StoreDatasources_Delete, L("DeleteStoreDatasource"));



            //var hardDatasources = pages.CreateChildPermission(AppPermissions.Pages_HardDatasources, L("HardDatasources"));
            //hardDatasources.CreateChildPermission(AppPermissions.Pages_HardDatasources_Create, L("CreateNewHardDatasource"));
            //hardDatasources.CreateChildPermission(AppPermissions.Pages_HardDatasources_Edit, L("EditHardDatasource"));
            //hardDatasources.CreateChildPermission(AppPermissions.Pages_HardDatasources_Delete, L("DeleteHardDatasource"));



            //var commandDatasources = pages.CreateChildPermission(AppPermissions.Pages_CommandDatasources, L("CommandDatasources"));
            //commandDatasources.CreateChildPermission(AppPermissions.Pages_CommandDatasources_Create, L("CreateNewCommandDatasource"));
            //commandDatasources.CreateChildPermission(AppPermissions.Pages_CommandDatasources_Edit, L("EditCommandDatasource"));
            //commandDatasources.CreateChildPermission(AppPermissions.Pages_CommandDatasources_Delete, L("DeleteCommandDatasource"));



            //var dynamicDatasource = pages.CreateChildPermission(AppPermissions.Pages_DynamicDatasource, L("DynamicDatasource"));
            //dynamicDatasource.CreateChildPermission(AppPermissions.Pages_DynamicDatasource_Create, L("CreateNewDynamicDatasource"));
            //dynamicDatasource.CreateChildPermission(AppPermissions.Pages_DynamicDatasource_Edit, L("EditDynamicDatasource"));
            //dynamicDatasource.CreateChildPermission(AppPermissions.Pages_DynamicDatasource_Delete, L("DeleteDynamicDatasource"));



            //var dynamicValues = pages.CreateChildPermission(AppPermissions.Pages_DynamicValues, L("DynamicValues"));
            //dynamicValues.CreateChildPermission(AppPermissions.Pages_DynamicValues_Create, L("CreateNewDynamicValue"));
            //dynamicValues.CreateChildPermission(AppPermissions.Pages_DynamicValues_Edit, L("EditDynamicValue"));
            //dynamicValues.CreateChildPermission(AppPermissions.Pages_DynamicValues_Delete, L("DeleteDynamicValue"));



            //var dynamicFields = pages.CreateChildPermission(AppPermissions.Pages_DynamicFields, L("DynamicFields"));
            //dynamicFields.CreateChildPermission(AppPermissions.Pages_DynamicFields_Create, L("CreateNewDynamicField"));
            //dynamicFields.CreateChildPermission(AppPermissions.Pages_DynamicFields_Edit, L("EditDynamicField"));
            //dynamicFields.CreateChildPermission(AppPermissions.Pages_DynamicFields_Delete, L("DeleteDynamicField"));



            //var sqlStoreParams = pages.CreateChildPermission(AppPermissions.Pages_SqlStoreParams, L("SqlStoreParams"));
            //sqlStoreParams.CreateChildPermission(AppPermissions.Pages_SqlStoreParams_Create, L("CreateNewSqlStoreParam"));
            //sqlStoreParams.CreateChildPermission(AppPermissions.Pages_SqlStoreParams_Edit, L("EditSqlStoreParam"));
            //sqlStoreParams.CreateChildPermission(AppPermissions.Pages_SqlStoreParams_Delete, L("DeleteSqlStoreParam"));



            //var sqlConfigDetails = pages.CreateChildPermission(AppPermissions.Pages_SqlConfigDetails, L("SqlConfigDetails"));
            //sqlConfigDetails.CreateChildPermission(AppPermissions.Pages_SqlConfigDetails_Create, L("CreateNewSqlConfigDetail"));
            //sqlConfigDetails.CreateChildPermission(AppPermissions.Pages_SqlConfigDetails_Edit, L("EditSqlConfigDetail"));
            //sqlConfigDetails.CreateChildPermission(AppPermissions.Pages_SqlConfigDetails_Delete, L("DeleteSqlConfigDetail"));



            //var sqlConfigs = pages.CreateChildPermission(AppPermissions.Pages_SqlConfigs, L("SqlConfigs"));
            //sqlConfigs.CreateChildPermission(AppPermissions.Pages_SqlConfigs_Create, L("CreateNewSqlConfig"));
            //sqlConfigs.CreateChildPermission(AppPermissions.Pages_SqlConfigs_Edit, L("EditSqlConfig"));
            //sqlConfigs.CreateChildPermission(AppPermissions.Pages_SqlConfigs_Delete, L("DeleteSqlConfig"));



            //var historyUploads = pages.CreateChildPermission(AppPermissions.Pages_HistoryUploads, L("HistoryUploads"));
            //historyUploads.CreateChildPermission(AppPermissions.Pages_HistoryUploads_Create, L("CreateNewHistoryUpload"));
            //historyUploads.CreateChildPermission(AppPermissions.Pages_HistoryUploads_Edit, L("EditHistoryUpload"));
            //historyUploads.CreateChildPermission(AppPermissions.Pages_HistoryUploads_Delete, L("DeleteHistoryUpload"));



            //var vanbans = pages.CreateChildPermission(AppPermissions.Pages_Vanbans, L("Vanbans"), multiTenancySides: MultiTenancySides.Host);
            //vanbans.CreateChildPermission(AppPermissions.Pages_Vanbans_Create, L("CreateNewVanban"), multiTenancySides: MultiTenancySides.Host);
            //vanbans.CreateChildPermission(AppPermissions.Pages_Vanbans_Edit, L("EditVanban"), multiTenancySides: MultiTenancySides.Host);
            //vanbans.CreateChildPermission(AppPermissions.Pages_Vanbans_Delete, L("DeleteVanban"), multiTenancySides: MultiTenancySides.Host);



            //var documentHandlings = pages.CreateChildPermission(AppPermissions.Pages_DocumentHandlings, L("DocumentHandlings"));
            //documentHandlings.CreateChildPermission(AppPermissions.Pages_DocumentHandlings_Create, L("CreateNewDocumentHandling"));
            //documentHandlings.CreateChildPermission(AppPermissions.Pages_DocumentHandlings_Edit, L("EditDocumentHandling"));
            //documentHandlings.CreateChildPermission(AppPermissions.Pages_DocumentHandlings_Delete, L("DeleteDocumentHandling"));



            //var schedules = pages.CreateChildPermission(AppPermissions.Pages_Schedules, L("Schedules"));
            //schedules.CreateChildPermission(AppPermissions.Pages_Schedules_Create, L("CreateNewSchedule"));
            //schedules.CreateChildPermission(AppPermissions.Pages_Schedules_Edit, L("EditSchedule"));
            //schedules.CreateChildPermission(AppPermissions.Pages_Schedules_Delete, L("DeleteSchedule"));



            //var promulgateds = pages.CreateChildPermission(AppPermissions.Pages_Promulgateds, L("Promulgateds"));
            //promulgateds.CreateChildPermission(AppPermissions.Pages_Promulgateds_Create, L("CreateNewPromulgated"));
            //promulgateds.CreateChildPermission(AppPermissions.Pages_Promulgateds_Edit, L("EditPromulgated"));
            //promulgateds.CreateChildPermission(AppPermissions.Pages_Promulgateds_Delete, L("DeletePromulgated"));



            //var receiveUnits = pages.CreateChildPermission(AppPermissions.Pages_ReceiveUnits, L("ReceiveUnits"));
            //receiveUnits.CreateChildPermission(AppPermissions.Pages_ReceiveUnits_Create, L("CreateNewReceiveUnit"));
            //receiveUnits.CreateChildPermission(AppPermissions.Pages_ReceiveUnits_Edit, L("EditReceiveUnit"));
            //receiveUnits.CreateChildPermission(AppPermissions.Pages_ReceiveUnits_Delete, L("DeleteReceiveUnit"));



            //var typeHandes = pages.CreateChildPermission(AppPermissions.Pages_TypeHandes, L("TypeHandes"));
            //typeHandes.CreateChildPermission(AppPermissions.Pages_TypeHandes_Create, L("CreateNewTypeHande"));
            //typeHandes.CreateChildPermission(AppPermissions.Pages_TypeHandes_Edit, L("EditTypeHande"));
            //typeHandes.CreateChildPermission(AppPermissions.Pages_TypeHandes_Delete, L("DeleteTypeHande"));



            //var documentHandlingDetails = pages.CreateChildPermission(AppPermissions.Pages_DocumentHandlingDetails, L("DocumentHandlingDetails"));
            //documentHandlingDetails.CreateChildPermission(AppPermissions.Pages_DocumentHandlingDetails_Create, L("CreateNewDocumentHandlingDetail"));
            //documentHandlingDetails.CreateChildPermission(AppPermissions.Pages_DocumentHandlingDetails_Edit, L("EditDocumentHandlingDetail"));
            //documentHandlingDetails.CreateChildPermission(AppPermissions.Pages_DocumentHandlingDetails_Delete, L("DeleteDocumentHandlingDetail"));



            //var memorizeKeywords = pages.CreateChildPermission(AppPermissions.Pages_MemorizeKeywords, L("MemorizeKeywords"));
            //memorizeKeywords.CreateChildPermission(AppPermissions.Pages_MemorizeKeywords_Create, L("CreateNewMemorizeKeyword"));
            //memorizeKeywords.CreateChildPermission(AppPermissions.Pages_MemorizeKeywords_Edit, L("EditMemorizeKeyword"));
            //memorizeKeywords.CreateChildPermission(AppPermissions.Pages_MemorizeKeywords_Delete, L("DeleteMemorizeKeyword"));



            //var documentDetails = pages.CreateChildPermission(AppPermissions.Pages_DocumentDetails, L("DocumentDetails"));
            //documentDetails.CreateChildPermission(AppPermissions.Pages_DocumentDetails_Create, L("CreateNewDocumentDetail"));
            //documentDetails.CreateChildPermission(AppPermissions.Pages_DocumentDetails_Edit, L("EditDocumentDetail"));
            //documentDetails.CreateChildPermission(AppPermissions.Pages_DocumentDetails_Delete, L("DeleteDocumentDetail"));



            //var workDetails = pages.CreateChildPermission(AppPermissions.Pages_WorkDetails, L("WorkDetails"));
            //workDetails.CreateChildPermission(AppPermissions.Pages_WorkDetails_Create, L("CreateNewWorkDetail"));
            //workDetails.CreateChildPermission(AppPermissions.Pages_WorkDetails_Edit, L("EditWorkDetail"));
            //workDetails.CreateChildPermission(AppPermissions.Pages_WorkDetails_Delete, L("DeleteWorkDetail"));



            //var wordProcessings = pages.CreateChildPermission(AppPermissions.Pages_WordProcessings, L("WordProcessings"));
            //wordProcessings.CreateChildPermission(AppPermissions.Pages_WordProcessings_Create, L("CreateNewWordProcessing"));
            //wordProcessings.CreateChildPermission(AppPermissions.Pages_WordProcessings_Edit, L("EditWordProcessing"));
            //wordProcessings.CreateChildPermission(AppPermissions.Pages_WordProcessings_Delete, L("DeleteWordProcessing"));



            //var workAssigns = pages.CreateChildPermission(AppPermissions.Pages_WorkAssigns, L("WorkAssigns"));
            //workAssigns.CreateChildPermission(AppPermissions.Pages_WorkAssigns_Create, L("CreateNewWorkAssign"));
            //workAssigns.CreateChildPermission(AppPermissions.Pages_WorkAssigns_Edit, L("EditWorkAssign"));
            //workAssigns.CreateChildPermission(AppPermissions.Pages_WorkAssigns_Delete, L("DeleteWorkAssign"));



            //var documentTypes = pages.CreateChildPermission(AppPermissions.Pages_DocumentTypes, L("DocumentTypes"));
            //documentTypes.CreateChildPermission(AppPermissions.Pages_DocumentTypes_Create, L("CreateNewDocumentType"));
            //documentTypes.CreateChildPermission(AppPermissions.Pages_DocumentTypes_Edit, L("EditDocumentType"));
            //documentTypes.CreateChildPermission(AppPermissions.Pages_DocumentTypes_Delete, L("DeleteDocumentType"));



            //var documentses = pages.CreateChildPermission(AppPermissions.Pages_Documents, L("Documentses"));
            //documentses.CreateChildPermission(AppPermissions.Pages_Documents_Create, L("CreateNewDocuments"));
            //documentses.CreateChildPermission(AppPermissions.Pages_Documents_Edit, L("EditDocuments"));
            //documentses.CreateChildPermission(AppPermissions.Pages_Documents_Delete, L("DeleteDocuments"));


            //pages.CreateChildPermission(AppPermissions.Pages_DemoUiComponents, L("DemoUiComponents"));



            var labels = administration.CreateChildPermission(AppPermissions.Pages_Administration_Labels, L("Labels"), multiTenancySides: MultiTenancySides.Host);

            labels.CreateChildPermission(AppPermissions.Pages_Administration_Labels_Create, L("CreateNewLabel"), multiTenancySides: MultiTenancySides.Host);
            labels.CreateChildPermission(AppPermissions.Pages_Administration_Labels_Edit, L("EditLabel"), multiTenancySides: MultiTenancySides.Host);
            labels.CreateChildPermission(AppPermissions.Pages_Administration_Labels_Delete, L("DeleteLabel"), multiTenancySides: MultiTenancySides.Host);



            //var settingConfigs = administration.CreateChildPermission(AppPermissions.Pages_Administration_SettingConfigs, L("SettingConfigs"), multiTenancySides: MultiTenancySides.Host);
            //settingConfigs.CreateChildPermission(AppPermissions.Pages_Administration_SettingConfigs_Create, L("CreateNewSettingConfig"), multiTenancySides: MultiTenancySides.Host);
            //settingConfigs.CreateChildPermission(AppPermissions.Pages_Administration_SettingConfigs_Edit, L("EditSettingConfig"), multiTenancySides: MultiTenancySides.Host);
            //settingConfigs.CreateChildPermission(AppPermissions.Pages_Administration_SettingConfigs_Delete, L("DeleteSettingConfig"), multiTenancySides: MultiTenancySides.Host);



            var menus = administration.CreateChildPermission(AppPermissions.Pages_Administration_Menus, L("Menus"));

            menus.CreateChildPermission(AppPermissions.Pages_Administration_Menus_Create, L("CreateNewMenu"));
            menus.CreateChildPermission(AppPermissions.Pages_Administration_Menus_Edit, L("EditMenu"));
            menus.CreateChildPermission(AppPermissions.Pages_Administration_Menus_Delete, L("DeleteMenu"));



            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"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Unlock, L("Unlock"));

            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"));
            organizationUnits.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits_ManageRoles, L("ManagingRoles"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_UiCustomization, L("VisualSettings"));

            //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);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_SubscriptionManagement, L("Subscription"), 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);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_MoveTenantsToAnotherEdition, L("MoveTenantsToAnotherEdition"), 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: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_HangfireDashboard, L("HangfireDashboard"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Host);
        }
Пример #20
0
 public override void SetPermissions(IPermissionDefinitionContext context)
 {
     context.CreatePermission(PermissionNames.Pages_Users, L("Users"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Pages_Farms, L("Farms"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Pages_Leather, L("Leather"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Leather_Add, L("Leather_Add"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Leather_Edit, L("Leather_Edit"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Leather_Delete, L("Leather_Delete"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Leather_SelectFarm, L("Leather_SelectFarm"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Leather_Details, L("Leather_Details"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Pages_Slaughterhouse, L("Slaughterhouse"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Pages_Tannery, L("Tannery"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Pages_Inventory, L("Inventory"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Pages_Production, L("Production"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Production_Admin, L("Production_Admin"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Pages_Shoemaker_Step1, L("Shoemaker_Step1"), multiTenancySides: MultiTenancySides.Host);
     context.CreatePermission(PermissionNames.Pages_Shoemaker_Step2, L("Shoemaker_Step2"), multiTenancySides: MultiTenancySides.Host);
 }
Пример #21
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            //context.CreatePermission(PermissionNames.Pages_Users, L("Users"));
            //context.CreatePermission(PermissionNames.Pages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);
            //context.CreatePermission(PermissionNames.Pages_Roles, L("角色"));


            var pages = context.GetPermissionOrNull(PermissionNames.Pages) ?? context.CreatePermission(PermissionNames.Pages, L("全部"));

            var system = pages.CreateChildPermission(PermissionNames.Pages_Administration, L("系统"));

            system.CreateChildPermission(PermissionNames.Pages_Administration_Settings, L("系统配置项"));
            system.CreateChildPermission(PermissionNames.Pages_SystemEntrance, L("系统入口"));
            system.CreateChildPermission(PermissionNames.Pages_Administration_Menus, L("菜单"));
            system.CreateChildPermission(PermissionNames.Pages_Administration_AuditLogs, L("审计日志"));
            system.CreateChildPermission(PermissionNames.Pages_NoticeAnnouncementMange, L("公告通知"));

            var userAbout         = pages.CreateChildPermission(PermissionNames.Pages_AboutUser, L("用户管理"));
            var organizationUnits = userAbout.CreateChildPermission(PermissionNames.Pages_Administration_OrganizationUnits, L("OrganizationUnits"));

            organizationUnits.CreateChildPermission(PermissionNames.Pages_Administration_OrganizationUnits_ManageOrganizationTree, L("ManagingOrganizationTree"));
            organizationUnits.CreateChildPermission(PermissionNames.Pages_Administration_OrganizationUnits_ManageMembers, L("ManagingMembers"));
            organizationUnits.CreateChildPermission(PermissionNames.Pages_Administration_OrganizationUnits_Lookup, L("查看组织机构"));

            userAbout.CreateChildPermission(PermissionNames.Pages_Roles, L("角色"));

            var users = userAbout.CreateChildPermission(PermissionNames.Pages_Administration_Users, L("用户"));

            users.CreateChildPermission(PermissionNames.Pages_Administration_Users_Create, L("新建"));
            users.CreateChildPermission(PermissionNames.Pages_Administration_Users_Edit, L("编辑"));
            users.CreateChildPermission(PermissionNames.Pages_Administration_Users_ChangeUserPassword, L("修改密码"));
            users.CreateChildPermission(PermissionNames.Pages_Administration_Users_Delete, L("删除"));
            users.CreateChildPermission(PermissionNames.Pages_Administration_Users_ChangePermissions, L("修改权限"));
            users.CreateChildPermission(PermissionNames.Pages_Administration_Users_Unlock, L("解锁"));
            users.CreateChildPermission(PermissionNames.Pages_Administration_Users_Active, L("启用禁用"));
            users.CreateChildPermission(PermissionNames.Pages_Administration_Users_Lookup, L("查看用户"));
            userAbout.CreateChildPermission(PermissionNames.Pages_ClassGroupMange, L("班组管理"));


            var data = pages.CreateChildPermission(PermissionNames.Pages_Data, L("数据管理"));

            data.CreateChildPermission(PermissionNames.Pages_TagManage, L("标签管理"));
            data.CreateChildPermission(PermissionNames.Oss_Aliyun_Manage, L("资源管理"));
            data.CreateChildPermission(PermissionNames.Pages_SkillManage, L("技能管理"));
            data.CreateChildPermission(PermissionNames.Pages_QuestLevelManage, L("谜题等级管理"));
            data.CreateChildPermission(PermissionNames.Pages_MicroworldThemeManage, L("微型世界主题"));
            data.CreateChildPermission(PermissionNames.Pages_CoursewareManage, L("学习资料"));
            var collection = data.CreateChildPermission(PermissionNames.Pages_Collection, L("收藏品管理"));

            collection.CreateChildPermission(PermissionNames.Pages_CollectionManage, L("收藏品基础配置"));
            collection.CreateChildPermission(PermissionNames.Pages_HumanBodyCollectionManage, L("人形收藏品管理"));
            collection.CreateChildPermission(PermissionNames.Pages_BadgeCollectionManage, L("徽章收藏品管理"));
            collection.CreateChildPermission(PermissionNames.Pages_AvatarCollectionManage, L("头像品基础管理"));
            data.CreateChildPermission(PermissionNames.Pages_QuizManage, L("题库管理"));


            var world = pages.CreateChildPermission(PermissionNames.Pages_World, L("世界运营"));

            world.CreateChildPermission(PermissionNames.Pages_MicroworldMange, L("微型世界"));
            world.CreateChildPermission(PermissionNames.Pages_AreaMange, L("区域"));
            world.CreateChildPermission(PermissionNames.Pages_QuestMange, L("谜题"));
            world.CreateChildPermission(PermissionNames.Pages_QuestOperationMange, L("谜题运营"));
        }
Пример #22
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 fincas = pages.CreateChildPermission(AppPermissions.Pages_Fincas, L("Fincas"));

            fincas.CreateChildPermission(AppPermissions.Pages_Fincas_Create, L("CreateNewFinca"));
            fincas.CreateChildPermission(AppPermissions.Pages_Fincas_Edit, L("EditFinca"));
            fincas.CreateChildPermission(AppPermissions.Pages_Fincas_Delete, L("DeleteFinca"));



            var clientes = pages.CreateChildPermission(AppPermissions.Pages_Clientes, L("Clientes"));

            clientes.CreateChildPermission(AppPermissions.Pages_Clientes_Create, L("CreateNewCliente"));
            clientes.CreateChildPermission(AppPermissions.Pages_Clientes_Edit, L("EditCliente"));
            clientes.CreateChildPermission(AppPermissions.Pages_Clientes_Delete, L("DeleteCliente"));



            var municipios = pages.CreateChildPermission(AppPermissions.Pages_Municipios, L("Municipios"));

            municipios.CreateChildPermission(AppPermissions.Pages_Municipios_Create, L("CreateNewMunicipio"));
            municipios.CreateChildPermission(AppPermissions.Pages_Municipios_Edit, L("EditMunicipio"));
            municipios.CreateChildPermission(AppPermissions.Pages_Municipios_Delete, L("DeleteMunicipio"));



            var departamentos = pages.CreateChildPermission(AppPermissions.Pages_Departamentos, L("Departamentos"));

            departamentos.CreateChildPermission(AppPermissions.Pages_Departamentos_Create, L("CreateNewDepartamento"));
            departamentos.CreateChildPermission(AppPermissions.Pages_Departamentos_Edit, L("EditDepartamento"));
            departamentos.CreateChildPermission(AppPermissions.Pages_Departamentos_Delete, L("DeleteDepartamento"));



            var paises = pages.CreateChildPermission(AppPermissions.Pages_Paises, L("Paises"));

            paises.CreateChildPermission(AppPermissions.Pages_Paises_Create, L("CreateNewPais"));
            paises.CreateChildPermission(AppPermissions.Pages_Paises_Edit, L("EditPais"));
            paises.CreateChildPermission(AppPermissions.Pages_Paises_Delete, L("DeletePais"));


            pages.CreateChildPermission(AppPermissions.Pages_DemoUiComponents, L("DemoUiComponents"));

            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"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_UiCustomization, L("VisualSettings"));

            //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);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_SubscriptionManagement, L("Subscription"), 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);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_MoveTenantsToAnotherEdition, L("MoveTenantsToAnotherEdition"), 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: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_HangfireDashboard, L("HangfireDashboard"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Host);
        }
Пример #23
0
 public override void SetPermissions(IPermissionDefinitionContext context)
 {
     //TODO: Localize (Change FixedLocalizableString to LocalizableString)
     context.CreatePermission("GetAnimals", new FixedLocalizableString("GetAnimals"));
     context.CreatePermission("CanQueryCount", new FixedLocalizableString("CanQueryCount"), isGrantedByDefault: true);
 }
        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);

            // config permissions for all groups
            context
            .ConfigGroup0()
            .ConfigGroup1()
            .ConfigGroup2()
            .ConfigGroup3()
            .ConfigGroup4()
            .ConfigGroup5()
            .ConfigGroup6()
            .ConfigGroup7()
            .ConfigGroup8()
            .ConfigGroup9()
            .ConfigGroup10()
            .ConfigGroup11()
            .ConfigGroup12()
            .ConfigGroup13()
            .ConfigGroup14();

            // JobType
            var jobType = context.CreatePermission(PermissionNames.Pages_JobType, L("JobType"));

            jobType.CreateChildPermission(PermissionNames.Pages_JobType_Create, L("CreateJobType"));
            jobType.CreateChildPermission(PermissionNames.Pages_JobType_Update, L("UpdateJobType"));
            jobType.CreateChildPermission(PermissionNames.Pages_JobType_Get, L("GetJobType"));
            jobType.CreateChildPermission(PermissionNames.Pages_JobType_Delete, L("DeleteJobType"));

            // RecruitmentPost
            var recruitmentPost = context.CreatePermission(PermissionNames.Pages_RecruitmentPost, L("RecruitmentPost"));

            recruitmentPost.CreateChildPermission(PermissionNames.Pages_RecruitmentPost_Create, L("CreateRecruitmentPost"));
            recruitmentPost.CreateChildPermission(PermissionNames.Pages_RecruitmentPost_Update, L("UpdateRecruitmentPost"));
            recruitmentPost.CreateChildPermission(PermissionNames.Pages_RecruitmentPost_Get, L("GetRecruitmentPost"));
            recruitmentPost.CreateChildPermission(PermissionNames.Pages_RecruitmentPost_Delete, L("DeleteRecruitmentPost"));

            // Comment
            var comment = context.CreatePermission(PermissionNames.Pages_Group8_Comment, L("Comment"));

            comment.CreateChildPermission(PermissionNames.Pages_Group8_Comment_Create_Or_Update, L("CreateOrUpdateComment"));
            comment.CreateChildPermission(PermissionNames.Pages_Group8_Comment_Delete, L("DeleteComment"));

            #region Group 5
            //JobSeeker
            var jobseeker = context.CreatePermission(PermissionNames.Pages_Group5_JobSeeker, L("JobSeeker"));
            jobseeker.CreateChildPermission(PermissionNames.Pages_Group5_JobSeeker_Create, L("CreateJobSeeker"));
            jobseeker.CreateChildPermission(PermissionNames.Pages_Group5_JobSeeker_Update, L("UpdateJobSeeker"));
            jobseeker.CreateChildPermission(PermissionNames.Pages_Group5_JobSeeker_Delete, L("DeleteJobSeeker"));

            //Achievement
            var achievement = context.CreatePermission(PermissionNames.Pages_Group5_Achievement, L("Achievement"));
            achievement.CreateChildPermission(PermissionNames.Pages_Group5_Achievement_Create, L("CreateAchievement"));
            achievement.CreateChildPermission(PermissionNames.Pages_Group5_Achievement_Update, L("UpdateAchievement"));
            achievement.CreateChildPermission(PermissionNames.Pages_Group5_Achievement_Delete, L("DeleteAchievement"));

            //Education
            var education = context.CreatePermission(PermissionNames.Pages_Group5_Education, L("Education"));
            education.CreateChildPermission(PermissionNames.Pages_Group5_Education_Create, L("CreateEducation"));
            education.CreateChildPermission(PermissionNames.Pages_Group5_Education_Update, L("UpdateEducation"));
            education.CreateChildPermission(PermissionNames.Pages_Group5_Education_Delete, L("DeleteEducation"));

            //Experience
            var experience = context.CreatePermission(PermissionNames.Pages_Group5_Experience, L("Experience"));
            experience.CreateChildPermission(PermissionNames.Pages_Group5_Experience_Create, L("CreateEducation"));
            experience.CreateChildPermission(PermissionNames.Pages_Group5_Experience_Update, L("UpdateEducation"));
            experience.CreateChildPermission(PermissionNames.Pages_Group5_Experience_Delete, L("DeleteEducation"));

            //Orientation
            var orientation = context.CreatePermission(PermissionNames.Pages_Group5_Orientation, L("Orientation"));
            orientation.CreateChildPermission(PermissionNames.Pages_Group5_Orientation_Create, L("CreateOrientation"));
            orientation.CreateChildPermission(PermissionNames.Pages_Group5_Orientation_Update, L("UpdateOrientation"));
            orientation.CreateChildPermission(PermissionNames.Pages_Group5_Orientation_Delete, L("DeleteOrientation"));

            //Review
            var review = context.CreatePermission(PermissionNames.Pages_Group5_Review, L("Review"));
            review.CreateChildPermission(PermissionNames.Pages_Group5_Review_Create, L("CreateReview"));
            review.CreateChildPermission(PermissionNames.Pages_Group5_Review_Update, L("UpdateReview"));
            review.CreateChildPermission(PermissionNames.Pages_Group5_Review_Delete, L("DeleteReview"));

            //Skill
            var skill = context.CreatePermission(PermissionNames.Pages_Group5_Skill, L("Skill"));
            skill.CreateChildPermission(PermissionNames.Pages_Group5_Skill_Create, L("CreateSkill"));
            skill.CreateChildPermission(PermissionNames.Pages_Group5_Skill_Update, L("UpdateSkill"));
            skill.CreateChildPermission(PermissionNames.Pages_Group5_Skill_Delete, L("DeleteSkill"));

            #endregion

            //  Recruitment
            var recruitment = context.CreatePermission(PermissionNames.Pages_Group6_Recruitment, L("Recruitment"));
            recruitment.CreateChildPermission(PermissionNames.Pages_Group6_Recruitment_Create, L("CreateRecruitment"));
            recruitment.CreateChildPermission(PermissionNames.Pages_Group6_Recruitment_Update, L("UpdateRecruitment"));

            //  Expertise
            var expertise = context.CreatePermission(PermissionNames.Pages_Group6_Expertise, L("Expertise"));
            expertise.CreateChildPermission(PermissionNames.Pages_Group6_Expertise_Create, L("CreateExpertise"));
        }
Пример #25
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 pbPriceUsers = pages.CreateChildPermission(AppPermissions.Pages_PbPriceUsers, L("PbPriceUsers"));

            pbPriceUsers.CreateChildPermission(AppPermissions.Pages_PbPriceUsers_Create, L("CreateNewPbPriceUser"));
            pbPriceUsers.CreateChildPermission(AppPermissions.Pages_PbPriceUsers_Edit, L("EditPbPriceUser"));
            pbPriceUsers.CreateChildPermission(AppPermissions.Pages_PbPriceUsers_Delete, L("DeletePbPriceUser"));



            var pbDownloadEbooks = pages.CreateChildPermission(AppPermissions.Pages_PbDownloadEbooks, L("PbDownloadEbooks"));

            pbDownloadEbooks.CreateChildPermission(AppPermissions.Pages_PbDownloadEbooks_Create, L("CreateNewPbDownloadEbook"));
            pbDownloadEbooks.CreateChildPermission(AppPermissions.Pages_PbDownloadEbooks_Edit, L("EditPbDownloadEbook"));
            pbDownloadEbooks.CreateChildPermission(AppPermissions.Pages_PbDownloadEbooks_Delete, L("DeletePbDownloadEbook"));



            var pbOppinions = pages.CreateChildPermission(AppPermissions.Pages_PbOppinions, L("PbOppinions"));

            pbOppinions.CreateChildPermission(AppPermissions.Pages_PbOppinions_Create, L("CreateNewPbOppinion"));
            pbOppinions.CreateChildPermission(AppPermissions.Pages_PbOppinions_Edit, L("EditPbOppinion"));
            pbOppinions.CreateChildPermission(AppPermissions.Pages_PbOppinions_Delete, L("DeletePbOppinion"));



            var pbEbooks = pages.CreateChildPermission(AppPermissions.Pages_PbEbooks, L("PbEbooks"));

            pbEbooks.CreateChildPermission(AppPermissions.Pages_PbEbooks_Create, L("CreateNewPbEbook"));
            pbEbooks.CreateChildPermission(AppPermissions.Pages_PbEbooks_Edit, L("EditPbEbook"));
            pbEbooks.CreateChildPermission(AppPermissions.Pages_PbEbooks_Delete, L("DeletePbEbook"));



            var pbSubjects = pages.CreateChildPermission(AppPermissions.Pages_PbSubjects, L("PbSubjects"));

            pbSubjects.CreateChildPermission(AppPermissions.Pages_PbSubjects_Create, L("CreateNewPbSubject"));
            pbSubjects.CreateChildPermission(AppPermissions.Pages_PbSubjects_Edit, L("EditPbSubject"));
            pbSubjects.CreateChildPermission(AppPermissions.Pages_PbSubjects_Delete, L("DeletePbSubject"));


            pages.CreateChildPermission(AppPermissions.Pages_DemoUiComponents, L("DemoUiComponents"));

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

            var pbLinkPros = administration.CreateChildPermission(AppPermissions.Pages_Administration_PbLinkPros, L("PbLinkPros"));

            pbLinkPros.CreateChildPermission(AppPermissions.Pages_Administration_PbLinkPros_Create, L("CreateNewPbLinkPro"));
            pbLinkPros.CreateChildPermission(AppPermissions.Pages_Administration_PbLinkPros_Edit, L("EditPbLinkPro"));
            pbLinkPros.CreateChildPermission(AppPermissions.Pages_Administration_PbLinkPros_Delete, L("DeletePbLinkPro"));



            var pbTypeEbooks = administration.CreateChildPermission(AppPermissions.Pages_Administration_PbTypeEbooks, L("PbTypeEbooks"));

            pbTypeEbooks.CreateChildPermission(AppPermissions.Pages_Administration_PbTypeEbooks_Create, L("CreateNewPbTypeEbook"));
            pbTypeEbooks.CreateChildPermission(AppPermissions.Pages_Administration_PbTypeEbooks_Edit, L("EditPbTypeEbook"));
            pbTypeEbooks.CreateChildPermission(AppPermissions.Pages_Administration_PbTypeEbooks_Delete, L("DeletePbTypeEbook"));



            var pbPlaces = administration.CreateChildPermission(AppPermissions.Pages_Administration_PbPlaces, L("PbPlaces"));

            pbPlaces.CreateChildPermission(AppPermissions.Pages_Administration_PbPlaces_Create, L("CreateNewPbPlace"));
            pbPlaces.CreateChildPermission(AppPermissions.Pages_Administration_PbPlaces_Edit, L("EditPbPlace"));
            pbPlaces.CreateChildPermission(AppPermissions.Pages_Administration_PbPlaces_Delete, L("DeletePbPlace"));



            var pbSubjectEducations = administration.CreateChildPermission(AppPermissions.Pages_Administration_PbSubjectEducations, L("PbSubjectEducations"));

            pbSubjectEducations.CreateChildPermission(AppPermissions.Pages_Administration_PbSubjectEducations_Create, L("CreateNewPbSubjectEducation"));
            pbSubjectEducations.CreateChildPermission(AppPermissions.Pages_Administration_PbSubjectEducations_Edit, L("EditPbSubjectEducation"));
            pbSubjectEducations.CreateChildPermission(AppPermissions.Pages_Administration_PbSubjectEducations_Delete, L("DeletePbSubjectEducation"));



            var pbStatuses = administration.CreateChildPermission(AppPermissions.Pages_Administration_PbStatuses, L("PbStatuses"));

            pbStatuses.CreateChildPermission(AppPermissions.Pages_Administration_PbStatuses_Create, L("CreateNewPbStatus"));
            pbStatuses.CreateChildPermission(AppPermissions.Pages_Administration_PbStatuses_Edit, L("EditPbStatus"));
            pbStatuses.CreateChildPermission(AppPermissions.Pages_Administration_PbStatuses_Delete, L("DeletePbStatus"));



            var pbTypeFiles = administration.CreateChildPermission(AppPermissions.Pages_Administration_PbTypeFiles, L("PbTypeFiles"));

            pbTypeFiles.CreateChildPermission(AppPermissions.Pages_Administration_PbTypeFiles_Create, L("CreateNewPbTypeFile"));
            pbTypeFiles.CreateChildPermission(AppPermissions.Pages_Administration_PbTypeFiles_Edit, L("EditPbTypeFile"));
            pbTypeFiles.CreateChildPermission(AppPermissions.Pages_Administration_PbTypeFiles_Delete, L("DeletePbTypeFile"));



            var pbRanks = administration.CreateChildPermission(AppPermissions.Pages_Administration_PbRanks, L("PbRanks"));

            pbRanks.CreateChildPermission(AppPermissions.Pages_Administration_PbRanks_Create, L("CreateNewPbRank"));
            pbRanks.CreateChildPermission(AppPermissions.Pages_Administration_PbRanks_Edit, L("EditPbRank"));
            pbRanks.CreateChildPermission(AppPermissions.Pages_Administration_PbRanks_Delete, L("DeletePbRank"));



            var pbClasses = administration.CreateChildPermission(AppPermissions.Pages_Administration_PbClasses, L("PbClasses"));

            pbClasses.CreateChildPermission(AppPermissions.Pages_Administration_PbClasses_Create, L("CreateNewPbClass"));
            pbClasses.CreateChildPermission(AppPermissions.Pages_Administration_PbClasses_Edit, L("EditPbClass"));
            pbClasses.CreateChildPermission(AppPermissions.Pages_Administration_PbClasses_Delete, L("DeletePbClass"));



            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"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Unlock, L("Unlock"));

            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"));
            organizationUnits.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits_ManageRoles, L("ManagingRoles"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_UiCustomization, L("VisualSettings"));

            //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);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_SubscriptionManagement, L("Subscription"), 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);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_MoveTenantsToAnotherEdition, L("MoveTenantsToAnotherEdition"), 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: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_HangfireDashboard, L("HangfireDashboard"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Host);
        }
        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 masterAmenitieses = pages.CreateChildPermission(AppPermissions.Pages_MasterAmenitieses, L("MasterAmenitieses"), multiTenancySides: MultiTenancySides.Host);

            masterAmenitieses.CreateChildPermission(AppPermissions.Pages_MasterAmenitieses_Create, L("CreateNewMasterAmenities"), multiTenancySides: MultiTenancySides.Host);
            masterAmenitieses.CreateChildPermission(AppPermissions.Pages_MasterAmenitieses_Edit, L("EditMasterAmenities"), multiTenancySides: MultiTenancySides.Host);
            masterAmenitieses.CreateChildPermission(AppPermissions.Pages_MasterAmenitieses_Delete, L("DeleteMasterAmenities"), multiTenancySides: MultiTenancySides.Host);

            var cruisePrices = pages.CreateChildPermission(AppPermissions.Pages_CruisePrices, L("CruisePrices"));

            cruisePrices.CreateChildPermission(AppPermissions.Pages_CruisePrices_Create, L("CreateNewCruisePrices"));
            cruisePrices.CreateChildPermission(AppPermissions.Pages_CruisePrices_Edit, L("EditCruisePrices"));
            cruisePrices.CreateChildPermission(AppPermissions.Pages_CruisePrices_Delete, L("DeleteCruisePrices"));

            var cruiseContract = pages.CreateChildPermission(AppPermissions.Pages_CruiseContract, L("CruiseContract"));

            cruiseContract.CreateChildPermission(AppPermissions.Pages_CruiseContract_Create, L("CreateNewCruiseContract"));
            cruiseContract.CreateChildPermission(AppPermissions.Pages_CruiseContract_Edit, L("EditCruiseContract"));
            cruiseContract.CreateChildPermission(AppPermissions.Pages_CruiseContract_Delete, L("DeleteCruiseContract"));

            var cruises = pages.CreateChildPermission(AppPermissions.Pages_Cruises, L("Cruises"));

            cruises.CreateChildPermission(AppPermissions.Pages_Cruises_Create, L("CreateNewCruises"));
            cruises.CreateChildPermission(AppPermissions.Pages_Cruises_Edit, L("EditCruises"));
            cruises.CreateChildPermission(AppPermissions.Pages_Cruises_Delete, L("DeleteCruises"));

            var cruisePhotos = pages.CreateChildPermission(AppPermissions.Pages_CruisePhotos, L("CruisePhotos"));

            cruisePhotos.CreateChildPermission(AppPermissions.Pages_CruisePhotos_Create, L("CreateNewCruisePhotos"));
            cruisePhotos.CreateChildPermission(AppPermissions.Pages_CruisePhotos_Edit, L("EditCruisePhotos"));
            cruisePhotos.CreateChildPermission(AppPermissions.Pages_CruisePhotos_Delete, L("DeleteCruisePhotos"));


            var cruiseReductions = pages.CreateChildPermission(AppPermissions.Pages_CruiseReductions, L("CruiseReductions"));

            cruiseReductions.CreateChildPermission(AppPermissions.Pages_CruiseReductions_Create, L("CreateNewCruiseReductions"));
            cruiseReductions.CreateChildPermission(AppPermissions.Pages_CruiseReductions_Edit, L("EditCruiseReductions"));
            cruiseReductions.CreateChildPermission(AppPermissions.Pages_CruiseReductions_Delete, L("DeleteCruiseReductions"));


            var cruiseServiceGroups = pages.CreateChildPermission(AppPermissions.Pages_CruiseServiceGroups, L("CruiseServiceGroups"));

            cruiseServiceGroups.CreateChildPermission(AppPermissions.Pages_CruiseServiceGroups_Create, L("CreateNewCruiseServiceGroups"));
            cruiseServiceGroups.CreateChildPermission(AppPermissions.Pages_CruiseServiceGroups_Edit, L("EditCruiseServiceGroups"));
            cruiseServiceGroups.CreateChildPermission(AppPermissions.Pages_CruiseServiceGroups_Delete, L("DeleteCruiseServiceGroups"));

            var cruiseContractCommissions = pages.CreateChildPermission(AppPermissions.Pages_CruiseContractCommissions, L("CruiseContractCommissions"));

            cruiseContractCommissions.CreateChildPermission(AppPermissions.Pages_CruiseContractCommissions_Create, L("CreateNewCruiseContractCommissions"));
            cruiseContractCommissions.CreateChildPermission(AppPermissions.Pages_CruiseContractCommissions_Edit, L("EditCruiseContractCommissions"));
            cruiseContractCommissions.CreateChildPermission(AppPermissions.Pages_CruiseContractCommissions_Delete, L("DeleteCruiseContractCommissions"));



            var cruiseItineraryDetails = pages.CreateChildPermission(AppPermissions.Pages_CruiseItineraryDetails, L("CruiseItineraryDetails"));

            cruiseItineraryDetails.CreateChildPermission(AppPermissions.Pages_CruiseItineraryDetails_Create, L("CreateNewCruiseItineraryDetails"));
            cruiseItineraryDetails.CreateChildPermission(AppPermissions.Pages_CruiseItineraryDetails_Edit, L("EditCruiseItineraryDetails"));
            cruiseItineraryDetails.CreateChildPermission(AppPermissions.Pages_CruiseItineraryDetails_Delete, L("DeleteCruiseItineraryDetails"));


            var cruiseFares = pages.CreateChildPermission(AppPermissions.Pages_CruiseFares, L("CruiseFares"));

            cruiseFares.CreateChildPermission(AppPermissions.Pages_CruiseFares_Create, L("CreateNewCruiseFares"));
            cruiseFares.CreateChildPermission(AppPermissions.Pages_CruiseFares_Edit, L("EditCruiseFares"));
            cruiseFares.CreateChildPermission(AppPermissions.Pages_CruiseFares_Delete, L("DeleteCruiseFares"));



            var clients = pages.CreateChildPermission(AppPermissions.Pages_Clients, L("Clients"));

            clients.CreateChildPermission(AppPermissions.Pages_Clients_Create, L("CreateNewClients"));
            clients.CreateChildPermission(AppPermissions.Pages_Clients_Edit, L("EditClients"));
            clients.CreateChildPermission(AppPermissions.Pages_Clients_Delete, L("DeleteClients"));

            var cruiseAmenitiesStorage = pages.CreateChildPermission(AppPermissions.Pages_CruiseAmenitiesStorage, L("CruiseAmenitiesStorage"));

            cruiseAmenitiesStorage.CreateChildPermission(AppPermissions.Pages_CruiseAmenitiesStorage_Create, L("CreateNewCruiseAmenitiesStorage"));
            cruiseAmenitiesStorage.CreateChildPermission(AppPermissions.Pages_CruiseAmenitiesStorage_Edit, L("EditCruiseAmenitiesStorage"));
            cruiseAmenitiesStorage.CreateChildPermission(AppPermissions.Pages_CruiseAmenitiesStorage_Delete, L("DeleteCruiseAmenitiesStorage"));


            var tenantTypes = pages.CreateChildPermission(AppPermissions.Pages_TenantTypes, L("TenantTypes"), multiTenancySides: MultiTenancySides.Host);

            tenantTypes.CreateChildPermission(AppPermissions.Pages_TenantTypes_Create, L("CreateNewTenantTypes"), multiTenancySides: MultiTenancySides.Host);
            tenantTypes.CreateChildPermission(AppPermissions.Pages_TenantTypes_Edit, L("EditTenantTypes"), multiTenancySides: MultiTenancySides.Host);
            tenantTypes.CreateChildPermission(AppPermissions.Pages_TenantTypes_Delete, L("DeleteTenantTypes"), multiTenancySides: MultiTenancySides.Host);

            var agePolicies = pages.CreateChildPermission(AppPermissions.Pages_AgePolicies, L("AgePolicies"));

            agePolicies.CreateChildPermission(AppPermissions.Pages_AgePolicies_Create, L("CreateNewAgePolicies"));
            agePolicies.CreateChildPermission(AppPermissions.Pages_AgePolicies_Edit, L("EditAgePolicies"));
            agePolicies.CreateChildPermission(AppPermissions.Pages_AgePolicies_Delete, L("DeleteAgePolicies"));

            var cancellationPolicy = pages.CreateChildPermission(AppPermissions.Pages_CancellationPolicy, L("CancellationPolicy"));

            cancellationPolicy.CreateChildPermission(AppPermissions.Pages_CancellationPolicy_Create, L("CreateNewCancellationPolicy"));
            cancellationPolicy.CreateChildPermission(AppPermissions.Pages_CancellationPolicy_Edit, L("EditCancellationPolicy"));
            cancellationPolicy.CreateChildPermission(AppPermissions.Pages_CancellationPolicy_Delete, L("DeleteCancellationPolicy"));


            var cruisesPerDeparture = pages.CreateChildPermission(AppPermissions.Pages_CruisesAllDeparture, L("CruisesAllDeparture"));

            cruisesPerDeparture.CreateChildPermission(AppPermissions.Pages_CruisesAllDeparture_Create, L("CreateNewCruisesAllDeparture"));
            cruisesPerDeparture.CreateChildPermission(AppPermissions.Pages_CruisesAllDeparture_Edit, L("EditCruisesAllDeparture"));
            cruisesPerDeparture.CreateChildPermission(AppPermissions.Pages_CruisesAllDeparture_Delete, L("DeleteCruisesAllDeparture"));

            var cruiseDefaultSeasons = pages.CreateChildPermission(AppPermissions.Pages_CruiseDefaultSeasons, L("CruiseDefaultSeasons"));

            cruiseDefaultSeasons.CreateChildPermission(AppPermissions.Pages_CruiseDefaultSeasons_Create, L("CreateNewCruiseDefaultSeasons"));
            cruiseDefaultSeasons.CreateChildPermission(AppPermissions.Pages_CruiseDefaultSeasons_Edit, L("EditCruiseDefaultSeasons"));
            cruiseDefaultSeasons.CreateChildPermission(AppPermissions.Pages_CruiseDefaultSeasons_Delete, L("DeleteCruiseDefaultSeasons"));

            var cruiseItineraries = pages.CreateChildPermission(AppPermissions.Pages_CruiseItineraries, L("CruiseItineraries"));

            cruiseItineraries.CreateChildPermission(AppPermissions.Pages_CruiseItineraries_Create, L("CreateNewCruiseItineraries"));
            cruiseItineraries.CreateChildPermission(AppPermissions.Pages_CruiseItineraries_Edit, L("EditCruiseItineraries"));
            cruiseItineraries.CreateChildPermission(AppPermissions.Pages_CruiseItineraries_Delete, L("DeleteCruiseItineraries"));



            var bedOptions = pages.CreateChildPermission(AppPermissions.Pages_BedOptions, L("BedOptions"), multiTenancySides: MultiTenancySides.Host);

            bedOptions.CreateChildPermission(AppPermissions.Pages_BedOptions_Create, L("CreateNewBedOptions"), multiTenancySides: MultiTenancySides.Host);
            bedOptions.CreateChildPermission(AppPermissions.Pages_BedOptions_Edit, L("EditBedOptions"), multiTenancySides: MultiTenancySides.Host);
            bedOptions.CreateChildPermission(AppPermissions.Pages_BedOptions_Delete, L("DeleteBedOptions"), multiTenancySides: MultiTenancySides.Host);


            pages.CreateChildPermission(AppPermissions.Pages_DemoUiComponents, L("DemoUiComponents"));

            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"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Unlock, L("Unlock"));

            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"));
            organizationUnits.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits_ManageRoles, L("ManagingRoles"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_UiCustomization, L("VisualSettings"));

            var webhooks = administration.CreateChildPermission(AppPermissions.Pages_Administration_WebhookSubscription, L("Webhooks"));

            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_WebhookSubscription_Create, L("CreatingWebhooks"));
            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_WebhookSubscription_Edit, L("EditingWebhooks"));
            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_WebhookSubscription_ChangeActivity, L("ChangingWebhookActivity"));
            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_WebhookSubscription_Detail, L("DetailingSubscription"));
            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_Webhook_ListSendAttempts, L("ListingSendAttempts"));
            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_Webhook_ResendWebhook, L("ResendingWebhook"));



            var cruiseBookingStatus = pages.CreateChildPermission(AppPermissions.Pages_CruiseBookingStatus, L("CruiseBookingStatus"));

            cruiseBookingStatus.CreateChildPermission(AppPermissions.Pages_CruiseBookingStatus_Create, L("CreateNewCruiseBookingStatus"));
            cruiseBookingStatus.CreateChildPermission(AppPermissions.Pages_CruiseBookingStatus_Edit, L("EditCruiseBookingStatus"));
            cruiseBookingStatus.CreateChildPermission(AppPermissions.Pages_CruiseBookingStatus_Delete, L("DeleteCruiseBookingStatus"));



            var dynamicParameters = administration.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameters, L("DynamicParameters"));

            dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameters_Create, L("CreatingDynamicParameters"));
            dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameters_Edit, L("EditingDynamicParameters"));
            dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameters_Delete, L("DeletingDynamicParameters"));

            var dynamicParameterValues = dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameterValue, L("DynamicParameterValue"));

            dynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameterValue_Create, L("CreatingDynamicParameterValue"));
            dynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameterValue_Edit, L("EditingDynamicParameterValue"));
            dynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameterValue_Delete, L("DeletingDynamicParameterValue"));

            var entityDynamicParameters = dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameters, L("EntityDynamicParameters"));

            entityDynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameters_Create, L("CreatingEntityDynamicParameters"));
            entityDynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameters_Edit, L("EditingEntityDynamicParameters"));
            entityDynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameters_Delete, L("DeletingEntityDynamicParameters"));

            var entityDynamicParameterValues = dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameterValue, L("EntityDynamicParameterValue"));

            entityDynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameterValue_Create, L("CreatingEntityDynamicParameterValue"));
            entityDynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameterValue_Edit, L("EditingEntityDynamicParameterValue"));
            entityDynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameterValue_Delete, L("DeletingEntityDynamicParameterValue"));

            //TENANT-SPECIFIC PERMISSIONS

            pages.CreateChildPermission(AppPermissions.Pages_Tenant_Dashboard, L("Dashboard"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_Settings, L("Settings"));
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_SubscriptionManagement, L("Subscription"));

            //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);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_MoveTenantsToAnotherEdition, L("MoveTenantsToAnotherEdition"), 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: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_HangfireDashboard, L("HangfireDashboard"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Host);
        }
Пример #27
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"));

            pages.CreateChildPermission(AppPermissions.Pages_DemoUiComponents, L("DemoUiComponents"));

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

            var notice = administration.CreateChildPermission(AppPermissions.Pages_Administration_Notice, L("Notice"));

            notice.CreateChildPermission(AppPermissions.Pages_Administration_Notice_Create, L("CreateNewNotice"));
            notice.CreateChildPermission(AppPermissions.Pages_Administration_Notice_Edit, L("EditNewNotice"));
            notice.CreateChildPermission(AppPermissions.Pages_Administration_Notice_Delete, L("DeleteNewNotice"));

            var support = administration.CreateChildPermission(AppPermissions.Pages_Administration_Support, L("Support"));

            support.CreateChildPermission(AppPermissions.Pages_Administration_Support_Create, L("CreateNewSupport"));
            support.CreateChildPermission(AppPermissions.Pages_Administration_Support_Edit, L("EditNewSupport"));
            support.CreateChildPermission(AppPermissions.Pages_Administration_Support_Delete, L("DeleteNewSupport"));

            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"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Unlock, L("Unlock"));

            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"));
            organizationUnits.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits_ManageRoles, L("ManagingRoles"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_UiCustomization, L("VisualSettings"));

            //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);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_SubscriptionManagement, L("Subscription"), 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);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_MoveTenantsToAnotherEdition, L("MoveTenantsToAnotherEdition"), 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: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_HangfireDashboard, L("HangfireDashboard"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Host);

            //Breed-app BaseInfo

            var monitoring = pages.CreateChildPermission(AppPermissions.Pages_Monitoring, L("Monitoring"));

            var baseInfo = pages.CreateChildPermission(AppPermissions.Pages_BaseInfo, L("BaseInfo"));

            var stateInfo = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_StateInfo, L("StateInfo"));

            stateInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_StateInfo_Create, L("CreateNewStateInfo"));
            stateInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_StateInfo_Edit, L("EditNewStateInfo"));
            stateInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_StateInfo_Delete, L("DeleteNewStateInfo"));

            var cityInfo = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_CityInfo, L("CityInfo"));

            cityInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_CityInfo_Create, L("CreateNewCityInfo"));
            cityInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_CityInfo_Edit, L("EditNewCityInfo"));
            cityInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_CityInfo_Delete, L("DeleteNewCityInfo"));

            var regionInfo = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_RegionInfo, L("RegionInfo"));

            regionInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_RegionInfo_Create, L("CreateNewRegionInfo"));
            regionInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_RegionInfo_Edit, L("EditNewRegionInfo"));
            regionInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_RegionInfo_Delete, L("DeleteNewRegionInfo"));

            var villageInfo = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_VillageInfo, L("VillageInfo"));

            villageInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_VillageInfo_Create, L("CreateNewVillageInfo"));
            villageInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_VillageInfo_Edit, L("EditNewVillageInfo"));
            villageInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_VillageInfo_Delete, L("DeleteNewVillageInfo"));

            var providerInfo = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_ProviderInfo, L("ProviderInfo"));

            providerInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_ProviderInfo_Create, L("CreateNewProviderInfo"));
            providerInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_ProviderInfo_Edit, L("EditNewProviderInfo"));
            providerInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_ProviderInfo_Delete, L("DeleteNewProviderInfo"));

            var activityInfo = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_ActivityInfo, L("ActivityInfo"));

            activityInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_ActivityInfo_Create, L("CreateNewActivityInfo"));
            activityInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_ActivityInfo_Edit, L("EditNewActivityInfo"));
            activityInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_ActivityInfo_Delete, L("DeleteNewActivityInfo"));

            var academicDegree = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_AcademicDegree, L("AcademicDegree"));

            academicDegree.CreateChildPermission(AppPermissions.Pages_BaseInfo_AcademicDegree_Create, L("CreateNewAcademicDegree"));
            academicDegree.CreateChildPermission(AppPermissions.Pages_BaseInfo_AcademicDegree_Edit, L("EditNewAcademicDegree"));
            academicDegree.CreateChildPermission(AppPermissions.Pages_BaseInfo_AcademicDegree_Delete, L("DeleteNewAcademicDegree"));

            var manufacturer = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_Manufacturer, L("Manufacturer"));

            manufacturer.CreateChildPermission(AppPermissions.Pages_BaseInfo_Manufacturer_Create, L("CreateNewManufacturer"));
            manufacturer.CreateChildPermission(AppPermissions.Pages_BaseInfo_Manufacturer_Edit, L("EditNewManufacturer"));
            manufacturer.CreateChildPermission(AppPermissions.Pages_BaseInfo_Manufacturer_Delete, L("DeleteNewManufacturer"));

            var sexInfo = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_SexInfo, L("SexInfo"));

            sexInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_SexInfo_Create, L("CreateNewSexInfo"));
            sexInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_SexInfo_Edit, L("EditNewSexInfo"));
            sexInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_SexInfo_Delete, L("DeleteNewSexInfo"));

            var speciesInfo = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_SpeciesInfo, L("SpeciesInfo"));

            speciesInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_SpeciesInfo_Create, L("CreateNewSpeciesInfo"));
            speciesInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_SpeciesInfo_Edit, L("EditNewSpeciesInfo"));
            speciesInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_SpeciesInfo_Delete, L("DeleteNewSpeciesInfo"));

            var firmType = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_FirmType, L("FirmType"));

            firmType.CreateChildPermission(AppPermissions.Pages_BaseInfo_FirmType_Create, L("CreateNewFirmType"));
            firmType.CreateChildPermission(AppPermissions.Pages_BaseInfo_FirmType_Edit, L("EditNewFirmType"));
            firmType.CreateChildPermission(AppPermissions.Pages_BaseInfo_FirmType_Delete, L("DeleteNewFirmType"));

            var plaqueState = baseInfo.CreateChildPermission(AppPermissions.Pages_BaseInfo_PlaqueState, L("PlaqueState"));

            plaqueState.CreateChildPermission(AppPermissions.Pages_BaseInfo_PlaqueState_Create, L("CreateNewPlaqueState"));
            plaqueState.CreateChildPermission(AppPermissions.Pages_BaseInfo_PlaqueState_Edit, L("EditNewPlaqueState"));
            plaqueState.CreateChildPermission(AppPermissions.Pages_BaseInfo_PlaqueState_Delete, L("DeleteNewPlaqueState"));

            //Breed-app baseIntro

            var baseIntro = pages.CreateChildPermission(AppPermissions.Pages_BaseIntro, L("BaseIntro"));

            var unionInfo = baseIntro.CreateChildPermission(AppPermissions.Pages_BaseIntro_UnionInfo, L("UnionInfo"));

            unionInfo.CreateChildPermission(AppPermissions.Pages_BaseIntro_UnionInfo_Create, L("CreateNewUnionInfo"));
            unionInfo.CreateChildPermission(AppPermissions.Pages_BaseIntro_UnionInfo_Edit, L("EditNewUnionInfo"));
            unionInfo.CreateChildPermission(AppPermissions.Pages_BaseIntro_UnionInfo_Delete, L("DeleteNewUnionInfo"));

            var unionEmployee = baseIntro.CreateChildPermission(AppPermissions.Pages_BaseIntro_UnionEmployee, L("UnionEmployee"));

            unionEmployee.CreateChildPermission(AppPermissions.Pages_BaseIntro_UnionEmployee_Create, L("CreateNewUnionEmployee"));
            unionEmployee.CreateChildPermission(AppPermissions.Pages_BaseIntro_UnionEmployee_Edit, L("EditNewUnionEmployee"));
            unionEmployee.CreateChildPermission(AppPermissions.Pages_BaseIntro_UnionEmployee_Delete, L("DeleteNewUnionEmployee"));

            var contractor = baseIntro.CreateChildPermission(AppPermissions.Pages_BaseIntro_Contractor, L("Contractor"));

            contractor.CreateChildPermission(AppPermissions.Pages_BaseIntro_Contractor_Create, L("CreateNewContractor"));
            contractor.CreateChildPermission(AppPermissions.Pages_BaseIntro_Contractor_Edit, L("EditNewContractor"));
            contractor.CreateChildPermission(AppPermissions.Pages_BaseIntro_Contractor_Delete, L("DeleteNewContractor"));

            var officer = baseIntro.CreateChildPermission(AppPermissions.Pages_BaseIntro_Officer, L("Officer"));

            officer.CreateChildPermission(AppPermissions.Pages_BaseIntro_Officer_Create, L("CreateNewOfficer"));
            officer.CreateChildPermission(AppPermissions.Pages_BaseIntro_Officer_Edit, L("EditNewOfficer"));
            officer.CreateChildPermission(AppPermissions.Pages_BaseIntro_Officer_Delete, L("DeleteNewOfficer"));

            var herd = baseIntro.CreateChildPermission(AppPermissions.Pages_BaseIntro_Herd, L("Herd"));

            herd.CreateChildPermission(AppPermissions.Pages_BaseIntro_Herd_Create, L("CreateNewHerd"));
            herd.CreateChildPermission(AppPermissions.Pages_BaseIntro_Herd_Edit, L("EditNewHerd"));
            herd.CreateChildPermission(AppPermissions.Pages_BaseIntro_Herd_Delete, L("DeleteNewHerd"));

            //Breed-app BaseInfo

            var identityInfo = pages.CreateChildPermission(AppPermissions.Pages_IdentityInfo, L("IdentityInfo"));

            var plaqueStore = identityInfo.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueStore, L("PlaqueStore"));

            plaqueStore.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueStore_Create, L("CreateNewPlaqueStore"));
            plaqueStore.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueStore_Edit, L("EditNewPlaqueStore"));
            plaqueStore.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueStore_Delete, L("DeleteNewPlaqueStore"));

            var plaqueToState = identityInfo.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToState, L("PlaqueToState"));

            plaqueToState.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToState_Create, L("CreateNewPlaqueToState"));
            plaqueToState.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToState_Edit, L("EditNewPlaqueToState"));
            plaqueToState.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToState_Delete, L("DeleteNewPlaqueToState"));

            var plaqueToContractor = identityInfo.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToContractor, L("PlaqueToContractor"));

            plaqueToContractor.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToContractor_Create, L("CreateNewPlaqueToContractor"));
            plaqueToContractor.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToContractor_Edit, L("EditNewPlaqueToContractor"));
            plaqueToContractor.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToContractor_Delete, L("DeleteNewPlaqueToContractor"));

            var plaqueToOfficer = identityInfo.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToOfficer, L("PlaqueToOfficer"));

            plaqueToOfficer.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToOfficer_Create, L("CreateNewPlaqueToOfficer"));
            plaqueToOfficer.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToOfficer_Edit, L("EditNewPlaqueToOfficer"));
            plaqueToOfficer.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToOfficer_Delete, L("DeleteNewPlaqueToOfficer"));

            var plaqueToHerd = identityInfo.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToHerd, L("PlaqueToHerd"));

            plaqueToHerd.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToHerd_Create, L("CreateNewPlaqueToHerd"));
            plaqueToHerd.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToHerd_Edit, L("EditNewPlaqueToHerd"));
            plaqueToHerd.CreateChildPermission(AppPermissions.Pages_IdentityInfo_PlaqueToHerd_Delete, L("DeleteNewPlaqueToHerd"));

            var identification = identityInfo.CreateChildPermission(AppPermissions.Pages_IdentityInfo_Identification, L("Identification"));

            identification.CreateChildPermission(AppPermissions.Pages_IdentityInfo_Identification_Create, L("CreateNewIdentification"));
            identification.CreateChildPermission(AppPermissions.Pages_IdentityInfo_Identification_Edit, L("EditNewIdentification"));
            identification.CreateChildPermission(AppPermissions.Pages_IdentityInfo_Identification_Delete, L("DeleteNewIdentification"));

            //Breed-app BaseInfo

            var activities = pages.CreateChildPermission(AppPermissions.Pages_Activities, L("Activities"));

            var editGeoHerd = activities.CreateChildPermission(AppPermissions.Pages_Activities_EditGeoHerd, L("EditGeoHerd"));

            editGeoHerd.CreateChildPermission(AppPermissions.Pages_Activities_EditGeoHerd_Create, L("CreateNewGeoHerd"));
            editGeoHerd.CreateChildPermission(AppPermissions.Pages_Activities_EditGeoHerd_Edit, L("EditNewGeoHerd"));
            editGeoHerd.CreateChildPermission(AppPermissions.Pages_Activities_EditGeoHerd_Delete, L("DeleteNewGeoHerd"));

            var editStatePlaque = activities.CreateChildPermission(AppPermissions.Pages_Activities_EditStatePlaque, L("EditStatePlaque"));

            editStatePlaque.CreateChildPermission(AppPermissions.Pages_Activities_EditStatePlaque_Create, L("CreateNewStatePlaque"));
            editStatePlaque.CreateChildPermission(AppPermissions.Pages_Activities_EditStatePlaque_Edit, L("EditNewStatePlaque"));
            editStatePlaque.CreateChildPermission(AppPermissions.Pages_Activities_EditStatePlaque_Delete, L("DeleteNewStatePlaque"));

            var herdCertificate = activities.CreateChildPermission(AppPermissions.Pages_Activities_HerdCertificate, L("HerdCertificate"));

            herdCertificate.CreateChildPermission(AppPermissions.Pages_Activities_HerdCertificate_Create, L("CreateNewHerdCertificate"));
            herdCertificate.CreateChildPermission(AppPermissions.Pages_Activities_HerdCertificate_Edit, L("EditNewHerdCertificate"));
            herdCertificate.CreateChildPermission(AppPermissions.Pages_Activities_HerdCertificate_Delete, L("DeleteNewHerdCertificate"));

            //Breed-app BaseInfo

            var reports = pages.CreateChildPermission(AppPermissions.Pages_Reports, L("Reports"));

            var herdLivestock = reports.CreateChildPermission(AppPermissions.Pages_Reports_HerdLivestock, L("HerdLivestock"));

            herdLivestock.CreateChildPermission(AppPermissions.Pages_Reports_HerdLivestock_Create, L("CreateNewHerdLivestock"));
            herdLivestock.CreateChildPermission(AppPermissions.Pages_Reports_HerdLivestock_Edit, L("EditNewHerdLivestock"));
            herdLivestock.CreateChildPermission(AppPermissions.Pages_Reports_HerdLivestock_Delete, L("DeleteNewHerdLivestock"));

            //Breed-app Inseminating

            var inseminating = pages.CreateChildPermission(AppPermissions.Pages_Inseminating, L("Inseminating"));

            var insemination = inseminating.CreateChildPermission(AppPermissions.Pages_Inseminating_Insemination, L("Insemination"));

            insemination.CreateChildPermission(AppPermissions.Pages_Inseminating_Insemination_Create, L("CreateNewInsemination"));
            insemination.CreateChildPermission(AppPermissions.Pages_Inseminating_Insemination_Edit, L("EditNewInsemination"));
            insemination.CreateChildPermission(AppPermissions.Pages_Inseminating_Insemination_Delete, L("DeleteNewInsemination"));

            var breedInf = inseminating.CreateChildPermission(AppPermissions.Pages_Inseminating_BreedInfo, L("BreedInfo"));

            breedInf.CreateChildPermission(AppPermissions.Pages_Inseminating_BreedInfo_Create, L("CreateNewBreedInfo"));
            breedInf.CreateChildPermission(AppPermissions.Pages_Inseminating_BreedInfo_Edit, L("EditNewBreedInfo"));
            breedInf.CreateChildPermission(AppPermissions.Pages_Inseminating_BreedInfo_Delete, L("DeleteNewBreedInfo"));

            var birthTypeInfo = inseminating.CreateChildPermission(AppPermissions.Pages_Inseminating_BirthTypeInfo, L("BirthTypeInfo"));

            birthTypeInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_BirthTypeInfo_Create, L("CreateNewBirthTypeInfo"));
            birthTypeInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_BirthTypeInfo_Edit, L("EditNewBirthTypeInfo"));
            birthTypeInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_BirthTypeInfo_Delete, L("DeleteNewBirthTypeInfo"));

            var anomalyInfo = inseminating.CreateChildPermission(AppPermissions.Pages_Inseminating_AnomalyInfo, L("AnomalyInfo"));

            anomalyInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_AnomalyInfo_Create, L("CreateNewAnomalyInfo"));
            anomalyInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_AnomalyInfo_Edit, L("EditNewAnomalyInfo"));
            anomalyInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_AnomalyInfo_Delete, L("DeleteNewAnomalyInfo"));

            var membershipInfo = inseminating.CreateChildPermission(AppPermissions.Pages_Inseminating_MembershipInfo, L("MembershipInfo"));

            membershipInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_MembershipInfo_Create, L("CreateNewMembershipInfo"));
            membershipInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_MembershipInfo_Edit, L("EditNewMembershipInfo"));
            membershipInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_MembershipInfo_Delete, L("DeleteNewMembershipInfo"));

            var bodyColorInfo = inseminating.CreateChildPermission(AppPermissions.Pages_Inseminating_BodyColorInfo, L("BodyColorInfo"));

            bodyColorInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_BodyColorInfo_Create, L("CreateNewBodyColorInfo"));
            bodyColorInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_BodyColorInfo_Edit, L("EditNewBodyColorInfo"));
            bodyColorInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_BodyColorInfo_Delete, L("DeleteNewBodyColorInfo"));

            var spotConnectorInfo = inseminating.CreateChildPermission(AppPermissions.Pages_Inseminating_SpotConnectorInfo, L("SpotConnectorInfo"));

            spotConnectorInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_SpotConnectorInfo_Create, L("CreateNewSpotConnectorInfo"));
            spotConnectorInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_SpotConnectorInfo_Edit, L("EditNewSpotConnectorInfo"));
            spotConnectorInfo.CreateChildPermission(AppPermissions.Pages_Inseminating_SpotConnectorInfo_Delete, L("DeleteNewSpotConnectorInfo"));
        }
Пример #28
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 glacgrp = pages.CreateChildPermission(AppPermissions.Pages_GLACGRP, L("GLACGRP"));
            //glacgrp.CreateChildPermission(AppPermissions.Pages_GLACGRP_Create, L("CreateNewGLACGRP"));
            //glacgrp.CreateChildPermission(AppPermissions.Pages_GLACGRP_Edit, L("EditGLACGRP"));
            //glacgrp.CreateChildPermission(AppPermissions.Pages_GLACGRP_Delete, L("DeleteGLACGRP"));



            //var glCstCent = pages.CreateChildPermission(AppPermissions.Pages_GLCstCent, L("GLCstCent"));
            //glCstCent.CreateChildPermission(AppPermissions.Pages_GLCstCent_Create, L("CreateNewGLCstCent"));
            //glCstCent.CreateChildPermission(AppPermissions.Pages_GLCstCent_Edit, L("EditGLCstCent"));
            //glCstCent.CreateChildPermission(AppPermissions.Pages_GLCstCent_Delete, L("DeleteGLCstCent"));



            //var glbooks = pages.CreateChildPermission(AppPermissions.Pages_GLBOOKS, L("GLBOOKS"));
            //glbooks.CreateChildPermission(AppPermissions.Pages_GLBOOKS_Create, L("CreateNewGLBOOKS"));
            //glbooks.CreateChildPermission(AppPermissions.Pages_GLBOOKS_Edit, L("EditGLBOOKS"));
            //glbooks.CreateChildPermission(AppPermissions.Pages_GLBOOKS_Delete, L("DeleteGLBOOKS"));



            //var glsrce = pages.CreateChildPermission(AppPermissions.Pages_GLSRCE, L("GLSRCE"));
            //glsrce.CreateChildPermission(AppPermissions.Pages_GLSRCE_Create, L("CreateNewGLSRCE"));
            //glsrce.CreateChildPermission(AppPermissions.Pages_GLSRCE_Edit, L("EditGLSRCE"));
            //glsrce.CreateChildPermission(AppPermissions.Pages_GLSRCE_Delete, L("DeleteGLSRCE"));


            pages.CreateChildPermission(AppPermissions.Pages_DemoUiComponents, L("DemoUiComponents"));

            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"));
            organizationUnits.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits_ManageRoles, L("ManagingRoles"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_UiCustomization, L("VisualSettings"));

            //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);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_SubscriptionManagement, L("Subscription"), 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);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_MoveTenantsToAnotherEdition, L("MoveTenantsToAnotherEdition"), 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: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_HangfireDashboard, L("HangfireDashboard"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Host);
        }
Пример #29
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 cities = pages.CreateChildPermission(AppPermissions.Pages_Cities, L("Cities"));

            cities.CreateChildPermission(AppPermissions.Pages_Cities_Create, L("CreateNewCity"));
            cities.CreateChildPermission(AppPermissions.Pages_Cities_Edit, L("EditCity"));
            cities.CreateChildPermission(AppPermissions.Pages_Cities_Delete, L("DeleteCity"));



            var sensors = pages.CreateChildPermission(AppPermissions.Pages_Sensors, L("Sensors"));

            sensors.CreateChildPermission(AppPermissions.Pages_Sensors_Create, L("CreateNewSensor"));
            sensors.CreateChildPermission(AppPermissions.Pages_Sensors_Edit, L("EditSensor"));
            sensors.CreateChildPermission(AppPermissions.Pages_Sensors_Delete, L("DeleteSensor"));



            var incidentApprovals = pages.CreateChildPermission(AppPermissions.Pages_IncidentApprovals, L("IncidentApprovals"));

            incidentApprovals.CreateChildPermission(AppPermissions.Pages_IncidentApprovals_Create, L("CreateNewIncidentApproval"));
            incidentApprovals.CreateChildPermission(AppPermissions.Pages_IncidentApprovals_Edit, L("EditIncidentApproval"));
            incidentApprovals.CreateChildPermission(AppPermissions.Pages_IncidentApprovals_Delete, L("DeleteIncidentApproval"));

            var mobilePushNotifications = pages.CreateChildPermission(AppPermissions.Pages_MobilePushNotification, L("MobilePushNotification"));

            mobilePushNotifications.CreateChildPermission(AppPermissions.Pages_MobilePushNotification_Send, L("Send"));
            mobilePushNotifications.CreateChildPermission(AppPermissions.Pages_MobilePushNotification_Get, L("GetAll"));

            var incidents = pages.CreateChildPermission(AppPermissions.Pages_Incidents, L("Incidents"));

            incidents.CreateChildPermission(AppPermissions.Pages_Incidents_Create, L("CreateNewIncident"));
            incidents.CreateChildPermission(AppPermissions.Pages_Incidents_Edit, L("EditIncident"));
            incidents.CreateChildPermission(AppPermissions.Pages_Incidents_Delete, L("DeleteIncident"));



            var locations = pages.CreateChildPermission(AppPermissions.Pages_Locations, L("Locations"));

            locations.CreateChildPermission(AppPermissions.Pages_Locations_Create, L("CreateNewLocation"));
            locations.CreateChildPermission(AppPermissions.Pages_Locations_Edit, L("EditLocation"));
            locations.CreateChildPermission(AppPermissions.Pages_Locations_Delete, L("DeleteLocation"));



            var pictures = pages.CreateChildPermission(AppPermissions.Pages_Pictures, L("Pictures"));

            pictures.CreateChildPermission(AppPermissions.Pages_Pictures_Create, L("CreateNewPicture"));
            pictures.CreateChildPermission(AppPermissions.Pages_Pictures_Edit, L("EditPicture"));
            pictures.CreateChildPermission(AppPermissions.Pages_Pictures_Delete, L("DeletePicture"));



            var creativeEntiies = pages.CreateChildPermission(AppPermissions.Pages_CreativeEntiies, L("Playground"));

            creativeEntiies.CreateChildPermission(AppPermissions.Pages_CreativeEntiies_Create, L("CreateNewCreativeEntiy"));
            creativeEntiies.CreateChildPermission(AppPermissions.Pages_CreativeEntiies_Edit, L("EditCreativeEntiy"));
            creativeEntiies.CreateChildPermission(AppPermissions.Pages_CreativeEntiies_Delete, L("DeleteCreativeEntiy"));


            pages.CreateChildPermission(AppPermissions.Pages_DemoUiComponents, L("DemoUiComponents"));

            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"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_UiCustomization, L("VisualSettings"));

            //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);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_SubscriptionManagement, L("Subscription"), 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: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_HangfireDashboard, L("HangfireDashboard"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Host);
        }
        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"));

            pages.CreateChildPermission(AppPermissions.Pages_DemoUiComponents, L("DemoUiComponents"));

            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"));
            users.CreateChildPermission(AppPermissions.Pages_Administration_Users_Unlock, L("Unlock"));

            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"));
            organizationUnits.CreateChildPermission(AppPermissions.Pages_Administration_OrganizationUnits_ManageRoles, L("ManagingRoles"));

            administration.CreateChildPermission(AppPermissions.Pages_Administration_UiCustomization, L("VisualSettings"));

            var webhooks = administration.CreateChildPermission(AppPermissions.Pages_Administration_WebhookSubscription, L("Webhooks"));

            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_WebhookSubscription_Create, L("CreatingWebhooks"));
            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_WebhookSubscription_Edit, L("EditingWebhooks"));
            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_WebhookSubscription_ChangeActivity, L("ChangingWebhookActivity"));
            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_WebhookSubscription_Detail, L("DetailingSubscription"));
            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_Webhook_ListSendAttempts, L("ListingSendAttempts"));
            webhooks.CreateChildPermission(AppPermissions.Pages_Administration_Webhook_ResendWebhook, L("ResendingWebhook"));

            var dynamicParameters = administration.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameters, L("DynamicParameters"));

            dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameters_Create, L("CreatingDynamicParameters"));
            dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameters_Edit, L("EditingDynamicParameters"));
            dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameters_Delete, L("DeletingDynamicParameters"));

            var dynamicParameterValues = dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameterValue, L("DynamicParameterValue"));

            dynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameterValue_Create, L("CreatingDynamicParameterValue"));
            dynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameterValue_Edit, L("EditingDynamicParameterValue"));
            dynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicParameterValue_Delete, L("DeletingDynamicParameterValue"));

            var entityDynamicParameters = dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameters, L("EntityDynamicParameters"));

            entityDynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameters_Create, L("CreatingEntityDynamicParameters"));
            entityDynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameters_Edit, L("EditingEntityDynamicParameters"));
            entityDynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameters_Delete, L("DeletingEntityDynamicParameters"));

            var entityDynamicParameterValues = dynamicParameters.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameterValue, L("EntityDynamicParameterValue"));

            entityDynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameterValue_Create, L("CreatingEntityDynamicParameterValue"));
            entityDynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameterValue_Edit, L("EditingEntityDynamicParameterValue"));
            entityDynamicParameterValues.CreateChildPermission(AppPermissions.Pages_Administration_EntityDynamicParameterValue_Delete, L("DeletingEntityDynamicParameterValue"));

            //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);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Tenant_SubscriptionManagement, L("Subscription"), 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);
            editions.CreateChildPermission(AppPermissions.Pages_Editions_MoveTenantsToAnotherEdition, L("MoveTenantsToAnotherEdition"), 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: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_HangfireDashboard, L("HangfireDashboard"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
            administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Host);
        }
 public override void SetPermissions(IPermissionDefinitionContext context)
 {
     var administration = context.CreatePermission("Administration", new LocalizableString("Administration", DogeDaycareConsts.LocalizationSourceName));
     var userMaintenance = administration.CreateChildPermission("Administration.UserMaintenance", new LocalizableString("UserMaintenance", DogeDaycareConsts.LocalizationSourceName));
     var roleMaintenance = administration.CreateChildPermission("Administration.RoleMaintenance", new LocalizableString("RoleMaintenance", DogeDaycareConsts.LocalizationSourceName));
 }
 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);
     context.CreatePermission(PermissionNames.Pages_Orders, L("Orders"));
     context.CreatePermission(PermissionNames.Pages_Orders_Admin, L("OrdersAdmin"));
     context.CreatePermission(PermissionNames.Pages_Booking, L("Booking"));
     context.CreatePermission(PermissionNames.Pages_Booking_Admin, L("BookingAdmin"));
     context.CreatePermission(PermissionNames.Order_Ready, L("OrderReady"));
     context.CreatePermission(PermissionNames.Order_Admin_Ready, L("OrderAdminReady"));
     context.CreatePermission(PermissionNames.Order_See_All, L("OrderSeeAll"));
     context.CreatePermission(PermissionNames.Assign_Company, L("AssignCompany"));
     context.CreatePermission(PermissionNames.Order_Admin_Invoice, L("OrderAdminInvoice"));
 }
Пример #33
0
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            context.CreatePermission(PermissionNames.CanManageStars, new FixedLocalizableString("可以管理明星"));
            context.CreatePermission(PermissionNames.CanManageTranslatings, new FixedLocalizableString("可以管理译文"));

        }
Пример #34
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"));
        }