adding IUserRetrieveService in IRequestContext #5859
dfaruque
started this conversation in
Serenity Ideas
Replies: 2 comments 1 reply
-
Please send the sample code |
Beta Was this translation helpful? Give feedback.
0 replies
-
We have some plans for that. But we will prefer to work on claims instead add IUserRetrieveService. User claims are the more modernized way to access the current user. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are many users of Serenity who face difficulty in fetching user definitions in the .net 5 versions of serenity. Because, if we need user definition in the repository then we need to add a parameter for IUserRetrieveService and pass that from the endpoint. It will be very convenient if we have IUserRetrieveService in IRequestContext, so that we don't need to add another parameter in the constructors for just retrieving the user definition. The code will be much simpler like the following
var userDefinition = User.GetUserDefinition(Context.UserRetrieveService);
Beta Was this translation helpful? Give feedback.
All reactions