View Issue Details

IDProjectCategoryView StatusLast Update
0026749mantisbtauthorizationpublic2020-03-10 17:23
Reporterjacekwww Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version2.22.1 
Summary0026749: user has access to other projects.
Description

I attach a screenshot and extract from the database:

select p.name AS Projekt, u.username AS USER FROM mantis_project_user_list_table AS l \
JOIN mantis_project_table AS p ON l.project_id = p.id \
JOIN mantis_user_table AS u ON l.user_id = u.id \
WHERE l.user_id = 5585;

+--------------+---------+
| Projekt | USER |
+--------------+---------+
| TiMS - Test | u094003 |
| ADPS | u094003 |
+--------------+---------+
2 rows in set (0.01 sec)

TagsNo tags attached.

Activities

jacekwww

jacekwww

2020-02-27 03:31

reporter  

Auswahl_017.png (36,740 bytes)   
Auswahl_017.png (36,740 bytes)   
atrol

atrol

2020-02-27 03:52

developer   ~0063707

Are all the displayed projects Private but not Public ?

dregad

dregad

2020-02-27 04:02

developer   ~0063708

Unless projects are marked as private, all users have access to them; project_user_list table only contains overrides to the global access (for both public and private projects).

Your SQL does not take that into consideration, please look at the query in user_api.php, function user_get_accessible_projects() for the correct logic.

Since you did not provide this information, I assume that the projects you don't want to see (marked by the red X in your screenshot) are public.

jacekwww

jacekwww

2020-02-27 04:14

reporter   ~0063709

Last edited: 2020-02-27 04:54

View 2 revisions

oh, thank you for the information and please close the issue.

for debug:
MySQL [mantisdb]> select name, view_state, enabled from mantis_project_table where view_state = 10 and enabled = 1 order by 1;

+----------------------+------------+---------+
| name                 | view_state | enabled |
+----------------------+------------+---------+
| ADPS                 |         10 |       1 |
| Application Site     |         10 |       1 |
| DB2 Systemsupport    |         10 |       1 |
| EPOS Interface       |         10 |       1 |
| IMS Managed Service  |         10 |       1 |
| PIA PROD             |         10 |       1 |
| PIA TEST             |         10 |       1 |
| PMO                  |         10 |       1 |
| Rhenus Broker (INTS) |         10 |       1 |
| SAP PowerDesigner    |         10 |       1 |
| TiMS - Test          |         10 |       1 |
+----------------------+------------+---------+
11 rows in set (0.01 sec)

EDIT (dregad): markdown

dregad

dregad

2020-02-27 04:55

developer   ~0063710

Thanks for the feedback.

Issue History

Date Modified Username Field Change
2020-02-27 03:31 jacekwww New Issue
2020-02-27 03:31 jacekwww File Added: Auswahl_017.png
2020-02-27 03:52 atrol Status new => feedback
2020-02-27 03:52 atrol Note Added: 0063707
2020-02-27 04:02 dregad Note Added: 0063708
2020-02-27 04:14 jacekwww Note Added: 0063709
2020-02-27 04:14 jacekwww Status feedback => new
2020-02-27 04:54 dregad Note Edited: 0063709 View Revisions
2020-02-27 04:55 dregad Assigned To => dregad
2020-02-27 04:55 dregad Status new => resolved
2020-02-27 04:55 dregad Resolution open => no change required
2020-02-27 04:55 dregad Note Added: 0063710
2020-03-10 17:23 atrol Status resolved => closed