Unfortunately, it can't be done.
But you can use Interceptor; You can use the interceptor method and get the return value. Here is a video about how to write and use it. https://abp.io/video-courses/essentials/interception
Hi,
It is added to the Audit log system globally, it will be activated for every app service method
Hi,
The httpContext.Response.Body is a stream; you can read it as a string and write it into a text file.
You can give it a try.
PS, don't forget to configure the
AbpAuditingOptionsto addResponseAuditLogContributor
Hi,
You can configure the AbpExceptionHandlingOptions
https://docs.abp.io/en/abp/latest/Exception-Handling#abpexceptionhandlingoptions
if(env == ....)
{
Configure<AbpExceptionHandlingOptions>(options =>
{
options.SendExceptionsDetailsToClients = true;
options.SendStackTraceToClients = true;
});
}
Hi,
It makes sense how to add permissions but what we need help with is where do we apply the permissions on a file by file basis?
You can override the DirectoryDescriptorAppService and FileDescriptorAppService services.
For example:
[ExposeServices(typeof(IDirectoryDescriptorRepository))]
[Dependency(ReplaceServices = true)]
public class MyDirectoryDescriptorAppService : DirectoryDescriptorAppService
{
public MyDirectoryDescriptorAppService(IDirectoryManager directoryManager, IFileManager fileManager, IDirectoryDescriptorRepository directoryDescriptorRepository, IFileDescriptorRepository fileDescriptorRepository, IOptions<FileIconOption> fileIconOption) : base(directoryManager, fileManager, directoryDescriptorRepository, fileDescriptorRepository, fileIconOption)
{
}
public override async Task<ListResultDto<DirectoryDescriptorInfoDto>> GetListAsync(Guid? parentId)
{
var list = await base.GetListAsync(parentId);
foreach (var item in list.Items)
{
// check permission here
}
}
}
How do we mark a file as confidential for example and then based on a permission filter it out from being viewable in the directory tree?
You can add an entity action to the action menu for an entity to make file as confidential
https://docs.abp.io/en/abp/latest/UI/Blazor/Entity-Action-Extensions
Hi,
You can consider creating an AuditLogContributor.
https://docs.abp.io/en/abp/latest/Audit-Logging#audit-log-contributors
For example:
public class ResponseAuditLogContributor : AuditLogContributor, ITransientDependency
{
public ResponseAuditLogContributor()
{
}
public override void PostContribute(AuditLogContributionContext context)
{
var httpContext = context.ServiceProvider.GetRequiredService<IHttpContextAccessor>().HttpContext;
if (httpContext == null)
{
return;
}
// read and log response body to audit log
//httpContext.Response.Body;
}
}
Hi,
Could you please share the full logs? thanks. my email is shiwei.liang@volosoft.com
You can try updating your Ocelot config
{
"DownstreamPathTemplate": "/signalr-hubs/{everything}",
"DownstreamScheme": "ws", // or wss
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44878
}
],
"UpstreamPathTemplate": "/signalr-hubs/{everything}"
}