View Issue Details

IDProjectCategoryView StatusLast Update
0027144mantisbtcode cleanuppublic2020-08-17 04:08
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Target Version2.25.0Fixed in Version2.25.0 
Summary0027144: Data integrity: ensure users' default_project preference is a valid project
Description

Currently, it is possible for a user's default project setting (user_pref_table.default_project) to contain an invalid project id.

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 have direct consequences in the MantisBT UI because it transparently copes with it, in terms of data integrity this should not happen.

Additional Information

The issue was identified while reviewing the patch for 0026988 - see https://github.com/mantisbt/mantisbt/pull/1677#issuecomment-637686480

TagsNo tags attached.

Relationships

related to 0026988 resolveddregad issue report TOO_MANY_REDIRECTS 

Activities

Related Changesets

MantisBT: master 5acff67b

2020-08-07 19:26:53

dregad

Details Diff
New User Pref API functions to clear project_default

Issue 0027144
Affected Issues
0027144
mod - core/user_pref_api.php Diff File

MantisBT: master 6023c6bc

2020-08-07 19:49:54

dregad

Details Diff
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
Affected Issues
0027144
mod - core/project_api.php Diff File

Issue History

Date Modified Username Field Change
2020-08-09 11:21 dregad New Issue
2020-08-09 11:21 dregad Status new => assigned
2020-08-09 11:21 dregad Assigned To => dregad
2020-08-09 11:33 dregad Description Updated View Revisions
2020-08-09 19:21 dregad Relationship added related to 0026988
2020-08-09 19:34 dregad Note Added: 0064254
2020-08-17 04:08 dregad Changeset attached => MantisBT master 5acff67b
2020-08-17 04:08 dregad Changeset attached => MantisBT master 6023c6bc
2020-08-17 04:08 dregad Status assigned => resolved
2020-08-17 04:08 dregad Resolution open => fixed
2020-08-17 04:08 dregad Fixed in Version => 2.25.0