hi
I think it's possible., You can override it to try.
hi arvind.srivastava.tas
You can refer to the OrganizationUnit implementation for your needs. It filters sub-items by code
// <summary>
/// Hierarchical Code of this organization unit.
/// Example: "00001.00042.00005".
/// This is a unique code for an OrganizationUnit.
/// It's changeable if OU hierarchy is changed.
/// </summary>
public virtual string Code { get; internal set; }
https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/OrganizationUnit.cs https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/OrganizationUnitManager.cs#L151
and you also check the code from https://github.com/maliming/Owl.GeneralTree
hi
Can you share a simple project to reproduce?
liming.ma@volosoft.com
Thanks.
hi
options.UserFriendlyEnums();
private static void ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAbpSwaggerGenWithOAuth(
configuration["AuthServer:Authority"]!,
new Dictionary<string, string>
{
{"BookStore", "BookStore API"}
},
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BookStore API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
options.UserFriendlyEnums();
});
}
hi
Please change your OnApplicationInitialization method by follow:
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var env = context.GetEnvironment();
var app = context.GetApplicationBuilder();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseAbpRequestLocalization();
if (!env.IsDevelopment())
{
app.UseErrorPage();
app.UseHsts();
}
app.UseCorrelationId();
app.UseAbpSecurityHeaders();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAbpOpenIddictValidation();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseDynamicClaims();
app.UseAuthorization();
app.Use(async (httpContext, next) =>
{
var authenticateResultFeature = httpContext.Features.Get<IAuthenticateResultFeature>();
if (authenticateResultFeature != null && authenticateResultFeature.AuthenticateResult == null)
{
if (httpContext.User.Identity?.IsAuthenticated == true)
{
authenticateResultFeature.AuthenticateResult = AuthenticateResult.Success(new AuthenticationTicket(httpContext.User, httpContext.User.Identity.AuthenticationType!));
}
}
await next(httpContext);
});
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "AzureSignalRPoc API");
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
ok, I will check it asap.
hi
Please share the full error stack. Thanks.
Follow: https://github.com/Azure/azure-signalr/pull/1918
hi
This seems to be a problem with https://github.com/Azure/azure-signalr.
But you can try the code below to fix it.
app.UseAuthorization();
app.Use(async (httpContext, next) =>
{
var authenticateResultFeature = httpContext.Features.Get<IAuthenticateResultFeature>();
if (authenticateResultFeature != null && authenticateResultFeature.AuthenticateResult == null)
{
if (httpContext.User.Identity?.IsAuthenticated == true)
{
authenticateResultFeature.AuthenticateResult = AuthenticateResult.Success(new AuthenticationTicket(httpContext.User, httpContext.User.Identity.AuthenticationType!));
}
}
await next(httpContext);
});
app.UseSwagger();