hi
Cannot resolve parameter 'TSD.DOCS.AdminCategoryService.ListOrganizations.IListOrganizationRepository listOrganizationRepository' of
Have you depended on the EF Core module?
Please share the code of implementation code of IListOrganizationRepository
Thanks.
hi
The errors are:
[ERR] repos/EnsurityTechnologies/XSenseDocumentation/releases was not found.
Response status code does not indicate success: 404 (Not Found).: https://raw.githubusercontent.com/EnsurityTechnologies/XSenseDocumentation/1.0.0/Docs/en/Index.md
What is your GitHub root URL?
Have you set up a GitHub access token?
hi
You can use Role-based / Policy-based authorization to customize your page and controller permissions.
https://learn.microsoft.com/en-us/aspnet/core/security/authorization/roles?view=aspnetcore-8.0&source=recommendations https://learn.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-8.0
https://github.com/abpframework/abp/pull/10152#issue-1007619207
No problem, Its same way.
hi
Now what we want is that when we update the permissions of a role, and if that role is assigned to a user in a tenant, it should immediately reflect the updated permissions for that tenant user.
I think these codes should works
eventData.Entity.Name is the permission name
eventData.Entity.ProviderName is the R
eventData.Entity.ProviderKey is the role name
You can get all permission names and remove them.
foreach(var permissionName in permissionNames)
{
var cacheKey = CalculateCacheKey(
permissionName,
eventData.Entity.ProviderName, // R
eventData.Entity.ProviderKey // role name
);
}
public override async Task HandleEventAsync(EntityChangedEventData<PermissionGrant> eventData)
{
var cacheKey = CalculateCacheKey(
eventData.Entity.Name,
eventData.Entity.ProviderName,
eventData.Entity.ProviderKey
);
var tenants = await TenantStore.GetListAsync();
foreach (var tenant in tenants)
{
using (CurrentTenant.Change(tenant.Id))
{
await Cache.RemoveAsync(cacheKey, considerUow: true);
}
}
}
hi
Can you try to replace the ILocalizableStringSerializer with MyLocalizableStringSerializer?
if (value.IsNullOrEmpty())
{
return new FixedLocalizableString(string.Empty);
}
if (value.Length < 3 ||
value[1] != ':')
{
return new FixedLocalizableString(value);
}
using System;
using Microsoft.Extensions.Options;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.Localization;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ILocalizableStringSerializer))]
public class MyLocalizableStringSerializer : ILocalizableStringSerializer, ITransientDependency
{
protected AbpLocalizationOptions LocalizationOptions { get; }
public MyLocalizableStringSerializer(IOptions<AbpLocalizationOptions> localizationOptions)
{
LocalizationOptions = localizationOptions.Value;
}
public virtual string? Serialize(ILocalizableString? localizableString)
{
if (localizableString == null)
{
return null;
}
if (localizableString is LocalizableString realLocalizableString)
{
return $"L:{realLocalizableString.ResourceName},{realLocalizableString.Name}";
}
if (localizableString is FixedLocalizableString fixedLocalizableString)
{
return $"F:{fixedLocalizableString.Value}";
}
throw new AbpException($"Unknown {nameof(ILocalizableString)} type: {localizableString.GetType().FullName}");
}
public virtual ILocalizableString Deserialize(string value)
{
if (value.IsNullOrEmpty())
{
return new FixedLocalizableString(string.Empty);
}
if (value.Length < 3 ||
value[1] != ':')
{
return new FixedLocalizableString(value);
}
var type = value[0];
switch (type)
{
case 'F':
return new FixedLocalizableString(value.Substring(2));
case 'L':
var commaPosition = value.IndexOf(',', 2);
if (commaPosition == -1)
{
throw new AbpException("Invalid LocalizableString value: " + value);
}
var resourceName = value.Substring(2, commaPosition - 2);
var name = value.Substring(commaPosition + 1);
if (name.IsNullOrWhiteSpace())
{
throw new AbpException("Invalid LocalizableString value: " + value);
}
return LocalizableString.Create(name, resourceName);
default:
return new FixedLocalizableString(value);
}
}
}
hi
Can you share some screenshots to show the component you want to override?
What is the UI type of your app?
hi
Can you write it in English?
Thanks.
Thanks. I will check it asap.