Base solution for your next web application
Open Closed

After upgrade with 13.2.0 got a error message , TenantId is not set in the IAbpSession #12015


User avatar
0
BiopanelSys created

We have a existing project in Asp.net Core + Anglur with framework .net 8 and version 13.1.0. We are going to upgrade in .net 8 and version 13.2.0

I have downloaded the latest version 13.2.0 and .net 8 project with same name and merged.

After merge , When I run application, login page load. after login with admin without select tenant.

Dashboard page not load and return error message FeatureChecker can not get a feature value by name. TenantId is not set in the IAbpSession!

complete error message

Abp.AbpException: FeatureChecker can not get a feature value by name. TenantId is not set in the IAbpSession! at Abp.Application.Features.FeatureChecker.GetValueAsync(String name) at Abp.Application.Features.FeatureChecker.IsEnabledAsync(String featureName) at Abp.Application.Features.FeatureCheckerExtensions.IsEnabledAsync(IFeatureChecker featureChecker, Boolean requiresAll, String[] featureNames) at Abp.Authorization.PermissionManager.FilterSatisfiedPermissionsAsync(FeatureDependencyContext featureDependencyContextObject, IList1 unfilteredPermissions) at Abp.Authorization.PermissionManager.GetAllPermissionsAsync(Boolean tenancyFilter) at Abp.Authorization.Roles.AbpRoleManager2.<>c__DisplayClass66_0.<<GetRolePermissionCacheItemAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Abp.Runtime.Caching.TypedCacheWrapper2.<>c__DisplayClass21_0.<<GetAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Abp.Runtime.Caching.AbpCacheBase2.GetAsync(TKey key, Func2 factory) at Abp.Runtime.Caching.TypedCacheWrapper2.GetAsync(TKey key, Func2 factory) at Abp.Authorization.Roles.AbpRoleManager2.GetRolePermissionCacheItemAsync(Int32 roleId) at Abp.Authorization.Roles.AbpRoleManager2.IsGrantedAsync(Int32 roleId, Permission permission) at Abp.Authorization.Users.AbpUserManager2.IsGrantedAsync(Int64 userId, Permission permission) at Abp.Authorization.Users.AbpUserManager2.IsGrantedAsync(Int64 userId, String permissionName) at Abp.Authorization.PermissionChecker2.IsGrantedAsync(Int64 userId, String permissionName) at Abp.Authorization.PermissionChecker`2.IsGrantedAsync(String permissionName) at Abp.Web.Configuration.AbpUserConfigurationBuilder.GetUserAuthConfig() at Abp.Web.Configuration.AbpUserConfigurationBuilder.GetAll() at PeoplePro.Web.Controllers.MyAbpUserConfigurationController.GetAll() in C:\Users\Dev1\Downloads\PeoplePro13.2.0 .net8\PeoplePro...

Can you please suggest, What I have missed?

Thanks


8 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you share your permission definition class ?

  • User Avatar
    0
    BiopanelSys created

    This one AppPermissions ?

    public static class AppPermissions { public const string Pages_Administration_SecondTierTenantManagement = "Pages.Administration.SecondTierTenantManagement"; public const string Pages_Administration_SecondTierTenantManagement_TenantAssignment = "Pages.Administration.SecondTierTenantManagement.TenantAssignment"; public const string Pages_Administration_SecondTierTenantManagement_TenantAssignment_Create = "Pages.Administration.SecondTierTenantManagement.TenantAssignment.Create"; public const string Pages_Administration_SecondTierTenantManagement_TenantAssignment_Edit = "Pages.Administration.SecondTierTenantManagement.TenantAssignment.Edit"; public const string Pages_Administration_SecondTierTenantManagement_TenantAssignment_Delete = "Pages.Administration.SecondTierTenantManagement.TenantAssignment.Delete";

    //COMMON PERMISSIONS (FOR BOTH OF TENANTS AND HOST)
    
    public const string Pages = "Pages";
    
    public const string Pages_DemoUiComponents = "Pages.DemoUiComponents";
    public const string Pages_Administration = "Pages.Administration";
    
    public const string Pages_Administration_Roles = "Pages.Administration.Roles";
    public const string Pages_Administration_Roles_Create = "Pages.Administration.Roles.Create";
    public const string Pages_Administration_Roles_Edit = "Pages.Administration.Roles.Edit";
    public const string Pages_Administration_Roles_Delete = "Pages.Administration.Roles.Delete";
    
    public const string Pages_Administration_Users = "Pages.Administration.Users";
    public const string Pages_Administration_Users_Create = "Pages.Administration.Users.Create";
    public const string Pages_Administration_Users_Edit = "Pages.Administration.Users.Edit";
    public const string Pages_Administration_Users_Delete = "Pages.Administration.Users.Delete";
    public const string Pages_Administration_Users_ChangePermissions = "Pages.Administration.Users.ChangePermissions";
    public const string Pages_Administration_Users_Impersonation = "Pages.Administration.Users.Impersonation";
    public const string Pages_Administration_Users_Unlock = "Pages.Administration.Users.Unlock";
    public const string Pages_Administration_Users_ChangeProfilePicture = "Pages.Administration.Users.ChangeProfilePicture";
    
    public const string Pages_Administration_Languages = "Pages.Administration.Languages";
    public const string Pages_Administration_Languages_Create = "Pages.Administration.Languages.Create";
    public const string Pages_Administration_Languages_Edit = "Pages.Administration.Languages.Edit";
    public const string Pages_Administration_Languages_Delete = "Pages.Administration.Languages.Delete";
    public const string Pages_Administration_Languages_ChangeTexts = "Pages.Administration.Languages.ChangeTexts";
    public const string Pages_Administration_Languages_ChangeDefaultLanguage = "Pages.Administration.Languages.ChangeDefaultLanguage";
    
    public const string Pages_Administration_AuditLogs = "Pages.Administration.AuditLogs";
    
    public const string Pages_Administration_DynamicInput = "Pages.Administration.DynamicInput";
    public const string Pages_Administration_DynamicInput_Create = "Pages.Administration.DynamicInput.Create";
    public const string Pages_Administration_DynamicInput_Edit = "Pages.Administration.DynamicInput.Edit";
    public const string Pages_Administration_DynamicInput_Delete = "Pages.Administration.DynamicInput.Delete";
    
    
    public const string Pages_Administration_OrganizationUnits = "Pages.Administration.OrganizationUnits";
    public const string Pages_Administration_OrganizationUnits_ManageOrganizationTree = "Pages.Administration.OrganizationUnits.ManageOrganizationTree";
    public const string Pages_Administration_OrganizationUnits_ManageMembers = "Pages.Administration.OrganizationUnits.ManageMembers";
    public const string Pages_Administration_OrganizationUnits_ManageRoles = "Pages.Administration.OrganizationUnits.ManageRoles";
    
    public const string Pages_Administration_AssetsManagement = "Pages.Administration.AssetsManagement";
    
    public const string Pages_Administration_AssetsManagement_AssetMapping = "Pages.Administration.AssetsManagement.AssetMapping";
    public const string Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToTenants = "Pages.Administration.AssetsManagement.AssetMapping.AssetMappingToTenants";
    public const string Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToLocations = "Pages.Administration.AssetsManagement.AssetMapping.AssetMappingToLocations";
    
    public const string Pages_Administration_AssetsManagement_AssetTypes = "Pages.Administration.AssetsManagement.AssetTypes";
    public const string Pages_Administration_AssetsManagement_AssetTypes_Create = "Pages.Administration.AssetsManagement.AssetTypes.Create";
    public const string Pages_Administration_AssetsManagement_AssetTypes_Edit = "Pages.Administration.AssetsManagement.AssetTypes.Edit";
    public const string Pages_Administration_AssetsManagement_AssetTypes_Delete = "Pages.Administration.AssetsManagement.AssetTypes.Delete";
    
    public const string Pages_Administration_AssetsManagement_Assets = "Pages.Administration.AssetsManagement.Assets";
    public const string Pages_Administration_AssetsManagement_Assets_Create = "Pages.Administration.AssetsManagement.Assets.Create";
    public const string Pages_Administration_AssetsManagement_Assets_Edit = "Pages.Administration.AssetsManagement.Assets.Edit";
    public const string Pages_Administration_AssetsManagement_Assets_Delete = "Pages.Administration.AssetsManagement.Assets.Delete";
    
    public const string Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToTenants_View = "Pages.Administration.AssetsManagement.AssetMapping.AssetMappingToTenants.View";
    public const string Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToTenants_Create = "Pages.Administration.AssetsManagement.AssetMapping.AssetMappingToTenants.Create";
    public const string Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToTenants_Edit = "Pages.Administration.AssetsManagement.AssetMapping.AssetMappingToTenants.Edit";
    public const string Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToTenants_Delete = "Pages.Administration.AssetsManagement.AssetMapping.AssetMappingToTenants.Delete";
    
    public const string Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToLocations_View = "Pages.Administration.AssetsManagement.AssetMapping.AssetMappingToLocations.View";
    public const string Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToLocations_Create = "Pages.Administration.AssetsManagement.AssetMapping.AssetMappingToLocations.Create";
    public const string Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToLocations_Edit = "Pages.Administration.AssetsManagement.AssetMapping.AssetMappingToLocations.Edit";
    public const string Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToLocations_Delete = "Pages.Administration.AssetsManagement.AssetMapping.AssetMappingToLocations.Delete";
    
    
    public const string Pages_Administration_HangfireDashboard = "Pages.Administration.HangfireDashboard";
    
    public const string Pages_Administration_UiCustomization = "Pages.Administration.UiCustomization";
    
    public const string Pages_Administration_WebhookSubscription = "Pages.Administration.WebhookSubscription";
    public const string Pages_Administration_WebhookSubscription_Create = "Pages.Administration.WebhookSubscription.Create";
    public const string Pages_Administration_WebhookSubscription_Edit = "Pages.Administration.WebhookSubscription.Edit";
    public const string Pages_Administration_WebhookSubscription_ChangeActivity = "Pages.Administration.WebhookSubscription.ChangeActivity";
    public const string Pages_Administration_WebhookSubscription_Detail = "Pages.Administration.WebhookSubscription.Detail";
    public const string Pages_Administration_Webhook_ListSendAttempts = "Pages.Administration.Webhook.ListSendAttempts";
    public const string Pages_Administration_Webhook_ResendWebhook = "Pages.Administration.Webhook.ResendWebhook";
    
    public const string Pages_Administration_DynamicProperties = "Pages.Administration.DynamicProperties";
    public const string Pages_Administration_DynamicProperties_Create = "Pages.Administration.DynamicProperties.Create";
    public const string Pages_Administration_DynamicProperties_Edit = "Pages.Administration.DynamicProperties.Edit";
    public const string Pages_Administration_DynamicProperties_Delete = "Pages.Administration.DynamicProperties.Delete";
    
    public const string Pages_Administration_DynamicPropertyValue = "Pages.Administration.DynamicPropertyValue";
    public const string Pages_Administration_DynamicPropertyValue_Create = "Pages.Administration.DynamicPropertyValue.Create";
    public const string Pages_Administration_DynamicPropertyValue_Edit = "Pages.Administration.DynamicPropertyValue.Edit";
    public const string Pages_Administration_DynamicPropertyValue_Delete = "Pages.Administration.DynamicPropertyValue.Delete";
    
    public const string Pages_Administration_DynamicEntityProperties = "Pages.Administration.DynamicEntityProperties";
    public const string Pages_Administration_DynamicEntityProperties_Create = "Pages.Administration.DynamicEntityProperties.Create";
    public const string Pages_Administration_DynamicEntityProperties_Edit = "Pages.Administration.DynamicEntityProperties.Edit";
    public const string Pages_Administration_DynamicEntityProperties_Delete = "Pages.Administration.DynamicEntityProperties.Delete";
    
    public const string Pages_Administration_DynamicEntityPropertyValue = "Pages.Administration.DynamicEntityPropertyValue";
    public const string Pages_Administration_DynamicEntityPropertyValue_Create = "Pages.Administration.DynamicEntityPropertyValue.Create";
    public const string Pages_Administration_DynamicEntityPropertyValue_Edit = "Pages.Administration.DynamicEntityPropertyValue.Edit";
    public const string Pages_Administration_DynamicEntityPropertyValue_Delete = "Pages.Administration.DynamicEntityPropertyValue.Delete";
    
    public const string Pages_Administration_MassNotification = "Pages.Administration.MassNotification";
    public const string Pages_Administration_MassNotification_Create = "Pages.Administration.MassNotification.Create";
    
    public const string Pages_Administration_OrderManagement = "Pages.Administration.OrderManagement";
    public const string Pages_Administration_OrderManagement_OrderItems = "Pages.Administration.OrderManagement.OrderItems";
    public const string Pages_Administration_OrderManagement_OrderItems_Create = "Pages.Administration.OrderManagement.OrderItems.Create";
    public const string Pages_Administration_OrderManagement_OrderItems_Edit = "Pages.Administration.OrderManagement.OrderItems.Edit";
    public const string Pages_Administration_OrderManagement_OrderItems_Delete = "Pages.Administration.OrderManagement.OrderItems.Delete";
    
    public const string Pages_Administration_OrderManagement_OrderRequests = "Pages.Administration.OrderManagement.OrderRequests";
    public const string Pages_Administration_OrderManagement_OrderRequests_Create = "Pages.Administration.OrderManagement.OrderRequests.Create";
    public const string Pages_Administration_OrderManagement_OrderRequests_Edit = "Pages.Administration.OrderManagement.OrderRequests.Edit";
    public const string Pages_Administration_OrderManagement_OrderRequests_Delete = "Pages.Administration.OrderManagement.OrderRequests.Delete";
    
    public const string Pages_Administration_OrderManagement_OrderClass = "Pages.Administration.OrderManagement.OrderClass";
    public const string Pages_Administration_OrderManagement_OrderClass_Create = "Pages.Administration.OrderManagement.OrderClass.Create";
    public const string Pages_Administration_OrderManagement_OrderClass_Edit = "Pages.Administration.OrderManagement.OrderClass.Edit";
    public const string Pages_Administration_OrderManagement_OrderClass_Delete = "Pages.Administration.OrderManagement.OrderClass.Delete";
    
    
    public const string Pages_Administration_NewVersion_Create = "Pages_Administration_NewVersion_Create";
    
    //TENANT-SPECIFIC PERMISSIONS
    
    public const string Pages_Tenant_Dashboard = "Pages.Tenant.Dashboard";
    
    public const string Pages_Administration_Tenant_Settings = "Pages.Administration.Tenant.Settings";
    
    public const string Pages_Administration_Tenant_SubscriptionManagement = "Pages.Administration.Tenant.SubscriptionManagement";
    
    public const string Pages_Administration_Tenant_AssetsManagement = "Pages.Administration.Tenant.AssetsManagement";
    public const string Pages_Administration_Tenant_AssetsManagement_Assets = "Pages.Administration.Tenant.AssetsManagement.Assets";
    public const string Pages_Administration_Tenant_AssetsManagement_Assets_Create = "Pages.Administration.Tenant.AssetsManagement.Assets.Create";
    public const string Pages_Administration_Tenant_AssetsManagement_Assets_Edit = "Pages.Administration.Tenant.AssetsManagement.Assets.Edit";
    public const string Pages_Administration_Tenant_AssetsManagement_Assets_Delete = "Pages.Administration.Tenant.AssetsManagement.Assets.Delete";
    
    public const string Pages_Administration_Tenant_AssetsManagement_AssetMappingToTenants = "Pages.Administration.Tenant.AssetsManagement.AssetMappingToTenants";
    public const string Pages_Administration_Tenant_AssetsManagement_AssetMappingToTenants_Create = "Pages.Administration.Tenant.AssetsManagement.AssetMappingToTenants.Create";
    public const string Pages_Administration_Tenant_AssetsManagement_AssetMappingToTenants_Edit = "Pages.Administration.Tenant.AssetsManagement.AssetMappingToTenants.Edit";
    public const string Pages_Administration_Tenant_AssetsManagement_AssetMappingToTenants_Delete = "Pages.Administration.Tenant.AssetsManagement.AssetMappingToTenants.Delete";
    
    public const string Pages_Tenant_Biopanel = "Pages.Tenant.Biopanel";
    
    //HOST-SPECIFIC PERMISSIONS
    
    public const string Pages_Editions = "Pages.Editions";
    public const string Pages_Editions_Create = "Pages.Editions.Create";
    public const string Pages_Editions_Edit = "Pages.Editions.Edit";
    public const string Pages_Editions_Delete = "Pages.Editions.Delete";
    public const string Pages_Editions_MoveTenantsToAnotherEdition = "Pages.Editions.MoveTenantsToAnotherEdition";
    
    public const string Pages_Tenants = "Pages.Tenants";
    public const string Pages_Tenants_Create = "Pages.Tenants.Create";
    public const string Pages_Tenants_Edit = "Pages.Tenants.Edit";
    public const string Pages_Tenants_ChangeFeatures = "Pages.Tenants.ChangeFeatures";
    public const string Pages_Tenants_Delete = "Pages.Tenants.Delete";
    public const string Pages_Tenants_Impersonation = "Pages.Tenants.Impersonation";
    
    public const string Pages_Administration_Host_Maintenance = "Pages.Administration.Host.Maintenance";
    public const string Pages_Administration_Host_Settings = "Pages.Administration.Host.Settings";
    public const string Pages_Administration_Host_Dashboard = "Pages.Administration.Host.Dashboard";
    
    public const string Pages_Administration_Host_OrderType = "Pages.Administration.Host.OrderType";
    public const string Pages_Administration_Host_OrderStatus = "Pages.Administration.Host.OrderStatus";
    public const string Pages_Administration_Host_VatSetting = "Pages.Administration.Host.VatSetting";
    
    public const string Pages_Administration_SecondTierTenantManagement_StaffAssignToTenants = "Pages.Administration.SecondTierTenantManagement.StaffAssignToTenants";
    public const string Pages_Administration_SecondTierTenantManagement_StaffAssignToTenants_Create = "Pages.Administration.SecondTierTenantManagement.StaffAssignToTenants.Create";
    public const string Pages_Administration_SecondTierTenantManagement_StaffAssignToTenants_Edit = "Pages.Administration.SecondTierTenantManagement.StaffAssignToTenants.Edit";
    public const string Pages_Administration_SecondTierTenantManagement_StaffAssignToTenants_Delete = "Pages.Administration.SecondTierTenantManagement.StaffAssignToTenants.Delete";
    

    }

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Sorry for not being specific, I meant AppAuthorizationProvider.cs.

  • User Avatar
    0
    BiopanelSys created

    Hi @ismcagdas AppAuthorizationProvider have large text not able to add in single comments so I will add in multiple comments

    public class AppAuthorizationProvider : AuthorizationProvider { private readonly bool _isMultiTenancyEnabled;

    public AppAuthorizationProvider(bool isMultiTenancyEnabled)
    {
        _isMultiTenancyEnabled = isMultiTenancyEnabled;
    }
    
    public AppAuthorizationProvider(IMultiTenancyConfig multiTenancyConfig)
    {
        _isMultiTenancyEnabled = multiTenancyConfig.IsEnabled;
    }
    
    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 secondTierTenantToTenantMappings = administration.CreateChildPermission(AppPermissions.Pages_Administration_SecondTierTenantManagement, L("SecondTierTenantManagement"));
        var tenantAssignment = secondTierTenantToTenantMappings.CreateChildPermission(AppPermissions.Pages_Administration_SecondTierTenantManagement_TenantAssignment, L("TenantAssignment"), multiTenancySides: MultiTenancySides.Host);
        tenantAssignment.CreateChildPermission(AppPermissions.Pages_Administration_SecondTierTenantManagement_TenantAssignment_Create, L("CreateNewTenantAssignment"), multiTenancySides: MultiTenancySides.Host);
        tenantAssignment.CreateChildPermission(AppPermissions.Pages_Administration_SecondTierTenantManagement_TenantAssignment_Edit, L("EditSecondTenantAssignment"), multiTenancySides: MultiTenancySides.Host);
        tenantAssignment.CreateChildPermission(AppPermissions.Pages_Administration_SecondTierTenantManagement_TenantAssignment_Delete, L("DeleteTenantAssignment"), multiTenancySides: MultiTenancySides.Host);
    
        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"));
        users.CreateChildPermission(AppPermissions.Pages_Administration_Users_ChangeProfilePicture, L("UpdateUsersProfilePicture"));
    
        var languages = administration.CreateChildPermission(AppPermissions.Pages_Administration_Languages, L("Languages"));
        languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Create, L("CreatingNewLanguage"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
        languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Edit, L("EditingLanguage"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
        languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_Delete, L("DeletingLanguages"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
        languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_ChangeTexts, L("ChangingTexts"));
        languages.CreateChildPermission(AppPermissions.Pages_Administration_Languages_ChangeDefaultLanguage, L("ChangeDefaultLanguage"));
    
        administration.CreateChildPermission(AppPermissions.Pages_Administration_AuditLogs, L("AuditLogs"));
    
        var dynamicInput = administration.CreateChildPermission(AppPermissions.Pages_Administration_DynamicInput, L("DynamicInput"));
        dynamicInput.CreateChildPermission(AppPermissions.Pages_Administration_DynamicInput_Create, L("CreateNewDynamicInput"));
        dynamicInput.CreateChildPermission(AppPermissions.Pages_Administration_DynamicInput_Edit, L("EditDynamicInput"));
        dynamicInput.CreateChildPermission(AppPermissions.Pages_Administration_DynamicInput_Delete, L("DeleteDynamicInput"));
    
        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"));
    
        var assetsManagement = administration.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement, L("AssetManagement"));
        var assetMapping = assetsManagement.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping, L("AssetMapping"));
    
        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 dynamicProperties = administration.CreateChildPermission(AppPermissions.Pages_Administration_DynamicProperties, L("DynamicProperties"));
        dynamicProperties.CreateChildPermission(AppPermissions.Pages_Administration_DynamicProperties_Create, L("CreatingDynamicProperties"));
        dynamicProperties.CreateChildPermission(AppPermissions.Pages_Administration_DynamicProperties_Edit, L("EditingDynamicProperties"));
        dynamicProperties.CreateChildPermission(AppPermissions.Pages_Administration_DynamicProperties_Delete, L("DeletingDynamicProperties"));
    
        var dynamicPropertyValues = dynamicProperties.CreateChildPermission(AppPermissions.Pages_Administration_DynamicPropertyValue, L("DynamicPropertyValue"));
        dynamicPropertyValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicPropertyValue_Create, L("CreatingDynamicPropertyValue"));
        dynamicPropertyValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicPropertyValue_Edit, L("EditingDynamicPropertyValue"));
        dynamicPropertyValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicPropertyValue_Delete, L("DeletingDynamicPropertyValue"));
    
        var dynamicEntityProperties = dynamicProperties.CreateChildPermission(AppPermissions.Pages_Administration_DynamicEntityProperties, L("DynamicEntityProperties"));
        dynamicEntityProperties.CreateChildPermission(AppPermissions.Pages_Administration_DynamicEntityProperties_Create, L("CreatingDynamicEntityProperties"));
        dynamicEntityProperties.CreateChildPermission(AppPermissions.Pages_Administration_DynamicEntityProperties_Edit, L("EditingDynamicEntityProperties"));
        dynamicEntityProperties.CreateChildPermission(AppPermissions.Pages_Administration_DynamicEntityProperties_Delete, L("DeletingDynamicEntityProperties"));
    
        var dynamicEntityPropertyValues = dynamicProperties.CreateChildPermission(AppPermissions.Pages_Administration_DynamicEntityPropertyValue, L("EntityDynamicPropertyValue"));
        dynamicEntityPropertyValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicEntityPropertyValue_Create, L("CreatingDynamicEntityPropertyValue"));
        dynamicEntityPropertyValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicEntityPropertyValue_Edit, L("EditingDynamicEntityPropertyValue"));
        dynamicEntityPropertyValues.CreateChildPermission(AppPermissions.Pages_Administration_DynamicEntityPropertyValue_Delete, L("DeletingDynamicEntityPropertyValue"));
    
        var orderManagement = administration.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement, L("OrderManagement"));
    
        var orderItems = orderManagement.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderItems, L("OrderItems"));
        orderItems.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderItems_Create, L("CreateNewOrderItem"));
        orderItems.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderItems_Edit, L("EditOrderItem"));
        orderItems.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderItems_Delete, L("DeleteOrderItem"));
    
        var orderRequests = orderManagement.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderRequests, L("OrderRequests"));
        orderRequests.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderRequests_Create, L("CreateNewOrderRequest"));
        orderRequests.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderRequests_Edit, L("EditOrderRequest"));
        orderRequests.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderRequests_Delete, L("DeleteOrderRequest"));
    
        var OrderClass = orderManagement.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderClass, L("OrderClass"));
        OrderClass.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderClass_Create, L("CreateNewOrderClass"));
        OrderClass.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderClass_Edit, L("EditOrderClass"));
        OrderClass.CreateChildPermission(AppPermissions.Pages_Administration_OrderManagement_OrderClass_Delete, L("DeleteOrderClass"));
    
        var massNotification = administration.CreateChildPermission(AppPermissions.Pages_Administration_MassNotification, L("MassNotifications"));
        massNotification.CreateChildPermission(AppPermissions.Pages_Administration_MassNotification_Create, L("MassNotificationCreate"));
    
        //TENANT-SPECIFIC PERMISSIONS
    
        pages.CreateChildPermission(AppPermissions.Pages_Tenant_Dashboard, L("Dashboard"), multiTenancySides: MultiTenancySides.Tenant);
    
        pages.CreateChildPermission(AppPermissions.Pages_Tenant_Biopanel, L("Biopanel"), 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);
    
        var assetMappingToLocations = assetMapping.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToLocations, L("AssetMappingToLocations"), multiTenancySides: MultiTenancySides.Tenant);
        assetMappingToLocations.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToLocations_View, L("ViewAssetMappingToLocation"), multiTenancySides: MultiTenancySides.Tenant);
        assetMappingToLocations.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToLocations_Create, L("CreateAssetMappingToLocation"), multiTenancySides: MultiTenancySides.Tenant);
        assetMappingToLocations.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToLocations_Edit, L("EditAssetMappingToLocation"), multiTenancySides: MultiTenancySides.Tenant);
        assetMappingToLocations.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToLocations_Delete, L("DeleteAssetMappingToLocation"), multiTenancySides: MultiTenancySides.Tenant);
    
        var staffAssignToTenant = secondTierTenantToTenantMappings.CreateChildPermission(AppPermissions.Pages_Administration_SecondTierTenantManagement_StaffAssignToTenants, L("TenantAssignment"), multiTenancySides: MultiTenancySides.Tenant, featureDependency: new SimpleFeatureDependency(AppFeatures.SecondTierTenant));
        staffAssignToTenant.CreateChildPermission(AppPermissions.Pages_Administration_SecondTierTenantManagement_StaffAssignToTenants_Create, L("CreateNewStaffAssignToTenants"), multiTenancySides: MultiTenancySides.Tenant);
        staffAssignToTenant.CreateChildPermission(AppPermissions.Pages_Administration_SecondTierTenantManagement_StaffAssignToTenants_Edit, L("EditStaffAssignToTenants"), multiTenancySides: MultiTenancySides.Tenant);
        staffAssignToTenant.CreateChildPermission(AppPermissions.Pages_Administration_SecondTierTenantManagement_StaffAssignToTenants_Delete, L("DeleteStaffAssignToTenants"), multiTenancySides: MultiTenancySides.Tenant);
        
    
  • User Avatar
    0
    BiopanelSys created

    Continue for AppAuthorizationProvider.cs class

        //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"), featureDependency: new SimpleFeatureDependency(AppFeatures.CanCreateTenant));
        tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Create, L("CreatingNewTenant"));
        tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Edit, L("EditingTenant"));
        tenants.CreateChildPermission(AppPermissions.Pages_Tenants_ChangeFeatures, L("ChangingFeatures"));
        tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Delete, L("DeletingTenant"));
        tenants.CreateChildPermission(AppPermissions.Pages_Tenants_Impersonation, L("LoginForTenants"));
    
        administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Settings, L("Settings"), multiTenancySides: MultiTenancySides.Host);
        
        var maintenance = administration.CreateChildPermission(AppPermissions.Pages_Administration_Host_Maintenance, L("Maintenance"), multiTenancySides: _isMultiTenancyEnabled ? MultiTenancySides.Host : MultiTenancySides.Tenant);
        maintenance.CreateChildPermission(AppPermissions.Pages_Administration_NewVersion_Create, L("SendNewVersionNotification"));
        
        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);
    
        var assetTypes = assetsManagement.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetTypes, L("AssetTypes"), multiTenancySides: MultiTenancySides.Host);
        assetTypes.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetTypes_Create, L("CreateNewAssetType"), multiTenancySides: MultiTenancySides.Host);
        assetTypes.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetTypes_Edit, L("EditAssetType"), multiTenancySides: MultiTenancySides.Host);
        assetTypes.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetTypes_Delete, L("DeleteAssetType"), multiTenancySides: MultiTenancySides.Host);
    
        var assets = assetsManagement.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_Assets, L("Asset"), multiTenancySides: MultiTenancySides.Host);
        assets.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_Assets_Create, L("CreateNewAsset"), multiTenancySides: MultiTenancySides.Host);
        assets.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_Assets_Edit, L("EditAsset"), multiTenancySides: MultiTenancySides.Host);
        assets.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_Assets_Delete, L("DeleteAsset"), multiTenancySides: MultiTenancySides.Host);
    
        var assetMappingToTenants = assetMapping.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToTenants, L("AssetMappingToTenants"), multiTenancySides: MultiTenancySides.Host);
        assetMappingToTenants.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToTenants_View, L("ViewAssetMappingToTenant"), multiTenancySides: MultiTenancySides.Host);
        assetMappingToTenants.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToTenants_Create, L("CreateAssetMappingToTenant"), multiTenancySides: MultiTenancySides.Host);
        assetMappingToTenants.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToTenants_Edit, L("EditAssetMappingToTenant"), multiTenancySides: MultiTenancySides.Host);
        assetMappingToTenants.CreateChildPermission(AppPermissions.Pages_Administration_AssetsManagement_AssetMapping_AssetMappingToTenants_Delete, L("DeleteAssetMappingToTenant"), multiTenancySides: MultiTenancySides.Host);
    }
    
    private static ILocalizableString L(string name)
    {
        return new LocalizableString(name, PeopleProConsts.LocalizationSourceName);
    }
    

    }

    Please combine both after that class will be complete

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @BiopanelSys

    Thank you for sharing detailed information, these all seem fine. Is it possible to share your project with [email protected] ?

  • User Avatar
    0
    BiopanelSys created

    This has now been sent to you.

    Regards

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We got the project and reproduced the problem. This happens because of the featureDependency of Tenants permission. If you delete it, problem will be solved;

    By design, you can't set featureDependency for only host side permissions. Tenants page must be accessed only bu host users.