MantisBT: master 6023c6bc

Author Committer Branch Timestamp Parent
dregad dregad master 2020-08-07 15:49 master 5acff67b
Affected Issues  0027144: Data integrity: ensure users' default_project preference is a valid project
Changeset

Ensure default_project pref is a valid project

It was possible for a user's default project setting to contain an
invalid project id (user_pref_table.default_project). This can happen
when the user is removed from the list of allowed users on a private
project, or when a project becomes private or is deleted. While this
does not impact the MantisBT UI which transparently copes with it, in
terms of data integrity this should not happen.

We now set default_project to ALL_PROJECTS (0) when users no longer have
access to their default project.

Fixes 0027144

mod - core/project_api.php Diff File