diff --git a/src/Fluss/Authentication/ArbitraryUserUnitOfWorkExtension.cs b/src/Fluss/Authentication/ArbitraryUserUnitOfWorkExtension.cs index 50faf07..fd7b6e5 100644 --- a/src/Fluss/Authentication/ArbitraryUserUnitOfWorkExtension.cs +++ b/src/Fluss/Authentication/ArbitraryUserUnitOfWorkExtension.cs @@ -70,6 +70,14 @@ public static UnitOfWorkFactory GetUserUnitOfWorkFactory(this IServiceProvider s return serviceProvider.GetRequiredService().GetUserUnitOfWorkFactory(userId); } + /// + /// Returns a UnitOfWork that is configured to use the provided Guid for determining the current user. + /// + /// You MUST call .Return() on the result of this function once it's not required any more. + /// + /// this + /// The id of the user that the UnitOfWork should use for authorization. + /// A UnitOfWork that is configured to use the provided Guid for determining the current user. public static IUnitOfWork GetUserUnitOfWork(this IServiceProvider serviceProvider, Guid userId) { return serviceProvider.GetRequiredService().GetUserUnitOfWork(userId); diff --git a/src/Fluss/Authentication/SystemUser.cs b/src/Fluss/Authentication/SystemUser.cs index 4544ac7..633b61c 100644 --- a/src/Fluss/Authentication/SystemUser.cs +++ b/src/Fluss/Authentication/SystemUser.cs @@ -9,6 +9,13 @@ public static UnitOfWorkFactory GetSystemUserUnitOfWorkFactory(this IServiceProv return serviceProvider.GetUserUnitOfWorkFactory(SystemUserGuid); } + /// + /// Returns a UnitOfWork that is configured to use the system user for authorization. + /// + /// You MUST call .Return() on the result of this function once it's not required any more. + /// + /// this + /// A UnitOfWork that is configured to use the system user for authorization. public static IUnitOfWork GetSystemUserUnitOfWork(this IServiceProvider serviceProvider) { return serviceProvider.GetUserUnitOfWork(SystemUserGuid);