Skip to content

Commit

Permalink
Call BeginOperationScope when getting the current user (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
meziantou authored Apr 28, 2023
1 parent d38c930 commit 5b79104
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion NGitLab.Mock/Clients/UserClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,16 @@ public IEnumerable<Models.User> All
}
}

public Session Current => Context.User?.ToClientSession();
public Session Current
{
get
{
using (Context.BeginOperationScope())
{
return Context.User?.ToClientSession();
}
}
}

public ISshKeyClient CurrentUserSShKeys => throw new NotSupportedException();

Expand Down

0 comments on commit 5b79104

Please sign in to comment.