Add tenant context interfaces for multi-tenant operations and user context management. Refactor logging in webhook endpoints and improve async method calls in repositories for better readability and performance.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
namespace StellaOps.Scanner.WebService.Tenancy;
|
||||
|
||||
/// <summary>
|
||||
/// Provides the current tenant context for multi-tenant operations.
|
||||
/// </summary>
|
||||
public interface ITenantContext
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the current tenant ID.
|
||||
/// </summary>
|
||||
string TenantId { get; }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace StellaOps.Scanner.WebService.Tenancy;
|
||||
|
||||
/// <summary>
|
||||
/// Provides the current user context for audit and authorization.
|
||||
/// </summary>
|
||||
public interface IUserContext
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the current user ID.
|
||||
/// </summary>
|
||||
string UserId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current user's display name.
|
||||
/// </summary>
|
||||
string? DisplayName { get; }
|
||||
}
|
||||
Reference in New Issue
Block a user