Hi, I have uploaded to Google Drive and resend email to share link to you on the email. thanks,
I sent email to you. Thanks
It can work with the standard screens generated with the template, the problem just happened with my screen developed from the separated module (in module I build pages for blazor web assembly) when integrating to Main Application using new Blazor Web App template the issue happened. Thanks
Thanks, in my case I cannot use different databases for modules and app so I have tried to install Lepton Theme to my App using ABP Suite instead of deleting LeptonManagement feature and now my App running properly without error of Undefined feature. Thank you so much for your support. Dharma Han Nguyen
Hi, I found the problem with LeptonManagment Feature:
Hi, I could run well with your code provided but I'm using the new Blazor Web App Template of v8.2 so I have changed as bellow:
Create method to add Group and Permission in Application layer
Create Interface in Contracts
Create Controller in HttpApi
Run application can create Permission Group and Permission in database
Check Permission from User/Role didn't see Group and Permission added Method in Application: public async Task<Task> AddPermissionAsync(string groupName, string permissionName) { var group = await _permissionGroupRepository.GetListAsync();
if (group.All(x => x.Name != groupName))
{
var permissionGroup = new PermissionGroupDefinitionRecord
{
Name = groupName,
DisplayName = $"L:{groupName},Permission: {groupName}"
};
await _permissionGroupRepository.InsertAsync(permissionGroup);
var permissions = await _permissionRepository.GetListAsync();
if (permissions.All(x => x.Name != permissionName))
{
var permission = new PermissionDefinitionRecord
{
Name = permissionName,
DisplayName = $"L:{permissionName},Permission: {permissionName}",
GroupName = groupName,
IsEnabled = true,
MultiTenancySide = MultiTenancySides.Both
};
await _permissionRepository.InsertAsync(permission);
await _distributedCache.RemoveAsync($"{_cacheOptions.KeyPrefix}_AbpInMemoryPermissionCacheStamp");
}
}
else
{
var permissionGroup = group.FirstOrDefault(x => x.Name == groupName);
var permissions = await _permissionRepository.GetListAsync();
if (permissions.All(x => x.Name != permissionName))
{
var permission = new PermissionDefinitionRecord
{
Name = permissionName,
DisplayName = $"L:{permissionName},Permission: {permissionName}",
GroupName = groupName,
IsEnabled = true,
MultiTenancySide = MultiTenancySides.Both
};
await _permissionRepository.InsertAsync(permission);
await _distributedCache.RemoveAsync($"{_cacheOptions.KeyPrefix}_AbpInMemoryPermissionCacheStamp");
}
}
return Task.CompletedTask;
}
If adding the following code in Blazor project it will threw the error, remove that code application run without error but cannot see created permission at runtime:
Thank you so much, if I'm using Blazor WebAssembly Application template I must implement this code in Application layer, right? Thanks