Project

General

Profile

Actions

Patch #18128

closed

Make User profile 404 rendering more consistent (and speed up Users#show API)

Added by Jan from Planio www.plan.io over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Accounts / authentication
Target version:
-
Start date:
Due date:
% Done:

90%

Estimated time:

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

Related to Redmine - Feature #18093: Please add the permission "can see project members" to the roles, or better an "hidden member" attribute for roles or membershipsClosed

Actions
Related to Redmine - Feature #11724: Prevent users from seeing other users based on their project membershipClosedJean-Philippe Lang

Actions
Related to Redmine - Feature #14601: Improve returned HTTP status code for requests for account/showNew

Actions
Actions

Also available in: Atom PDF