Patch #18128
closedMake User profile 404 rendering more consistent (and speed up Users#show API)
90%
Description
Users#show
(viewing the profile of any given user) can display three main sections of information:
- The name, email, registered on, last connection, and custom fields pertaining to the user (personal information)
- The user's memberships in projects
- The user's last activity in any projects
Currently, if the user has (a) at least one membership or (b) at least some activity, the user profile is shown, including the three sections above.
If the user has no membersip and no activity, the page is not shown and a 404 is returned.
I think this is not very consistent. In the latter case, a visitor of the user's profile page could still be interested in seeing the user's personal information, even if she/he has no memberships or activity.
This patch fixes this behaviour and always displays a user profile.
The reason for this patch was that we noticed that the Users#show
API call takes considerable time currently. It turns out, this is due to the fact that the user's activity is pulled even in case of an API request (for which the actiity is not needed). So, in order to be able to move fetching of the activity to the format.html
block, we made the change above. We think that both changes make sense, somehow.)
Files
Related issues