View Issue Details

IDProjectCategoryView StatusLast Update
0010888mantisbtsecuritypublic2013-01-02 02:54
Reporterbighux Assigned Toatrol  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformApache 2.2.12 + PHP 5.3.0OSWindows XP 
Product Version1.2.0rc1 
Summary0010888: Can't create bug with right viewer on all project but administrator on 1 project
Description

If an user has only one project access, the menu links are wrong (see the capture, I can manage the project but I can't view the report page link).
If I view a bug the report link is displayed, and after on the other pages it is'nt displayed.
After call bug_report_advanced_page.php directly the report page link is displayed on all pages.

Steps To Reproduce

Create new private project.
Create new user with default viewer right on all project.
Affect user to project with administrator right.
Logout and login with user.
The report page link isn't displayed.

TagsNo tags attached.
Attached Files
bugMantisAdmin.png (26,096 bytes)   
bugMantisAdmin.png (26,096 bytes)   

Activities

bighux

bighux

2009-08-30 14:27

reporter   ~0022827

The problem is in helper_get_current_project() from helper_api.php, if user can access only 1 project, function shouldn't return ALL_PROJECTS.

bighux

bighux

2009-09-04 04:49

reporter   ~0022855

Last edited: 2009-09-04 04:49

I have modified the file and it is works, edit helper_api.php line 209 in the if condition.
if( !project_exists( $t_project_id ) || ( 0 == project_get_field( $t_project_id, 'enabled' ) ) || !access_has_project_level( VIEWER, $t_project_id ) ) {
$t_projects = project_cache_all();
$t_projects_count = 0;
$t_last_id_project = ALL_PROJECTS;
foreach($t_projects as $tmp_project_id => $tmp_project){
if( access_has_project_level(VIEWER, $tmp_project['id'] ) ) {
$t_projects_count++;
$t_last_id_project = $tmp_project['id'];
}
}
if($t_projects_count == 1) {
$t_project_id = (int)$t_last_id_project;
}
else{
$t_project_id = ALL_PROJECTS;
}
}
I think a question is the function should return only the project id or the project list (with "all projects" and the project) should be displayed ?

atrol

atrol

2012-12-23 07:38

developer   ~0034607

This issue is not reproducible with the current version of MantisBT.

We recommend that you upgrade to the latest stable version [1]; if after doing so the problem persists, do not hesitate to reopen the issue, with additional relevant information.

[1] https://sourceforge.net/projects/mantisbt/files/mantis-stable/