You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside SpringSecurityService.groovy there is a getCurrentUserId() method that returns the id property from the principal. I see no reference to this method in the documentation.
Is this method the optimal way to fetch the currentUser's primary identifier of the applications User entity or should we always use the documented springSecurityService.getCurrentUser() and grab the identifier from this User instance?
The getCurrentUserId() has the benefit of not making an additional database call / transaction to fetch the entire user record (for cases where we just need the identifier).
My concern is that the getCurrentUserId() method is not referenced in any official documentation and therefore it may not be supported or included long term?
Thank you,
henryc-agr
The text was updated successfully, but these errors were encountered:
Issue description
Inside SpringSecurityService.groovy there is a getCurrentUserId() method that returns the id property from the principal. I see no reference to this method in the documentation.
Is this method the optimal way to fetch the currentUser's primary identifier of the applications User entity or should we always use the documented springSecurityService.getCurrentUser() and grab the identifier from this User instance?
The getCurrentUserId() has the benefit of not making an additional database call / transaction to fetch the entire user record (for cases where we just need the identifier).
My concern is that the getCurrentUserId() method is not referenced in any official documentation and therefore it may not be supported or included long term?
Thank you,
henryc-agr
The text was updated successfully, but these errors were encountered: