View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0025133||mantisbt||ui||public||2018-12-31 11:02||2019-03-16 20:20|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Target Version||2.20.0||Fixed in Version||2.20.0|
|Summary||0025133: Project selection is shown even if the user has no accesible projects|
Currently, the project selector is hidden if the user has only one accessible project.
For consistency, in that scenario, the project list shouldn't be displayed.
|Tags||No tags attached.|
MantisBT: master 8c704951
Committer: dregad Details Diff
|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
- 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|