MantisBT: master 8c704951

Author Committer Branch Timestamp Parent
cproensa dregad master 2018-12-31 05:53 master 8467f5bd
Affected Issues  0025110: Token error when login with a newly created user
 0025133: Project selection is shown even if the user has no accesible projects
Changeset

Rewrite hide project list and default project check

Previously, when a user only has one project, some things happens:

  • The project selector was hidden, as it is not useful without more
    projects.
  • A check is performed where if current project is ALL_PROJECTS, then
    current and default project are updated to the only available project.

To fix issues with that implementation, the logic has been separated:

  • Helper function to check if the user has more than one project. It's
    used in layout_api to decide if the project selector must be shown.
  • Helper function to check if the user has ALL_PROJECTS as
    current/default project when only one is available. In that case,
    update current and modify default in user preferences.

Fixes: 0025110, 0025133

mod - core/current_user_api.php Diff File
mod - core/layout_api.php Diff File
mod - core/user_api.php Diff File