Problem with view all bug page and all projects selected

General discussion of Mantis.

Moderators: Contributor, Developer

Post Reply
Tk421
Posts: 7
Joined: Oct 06, 2010 1:22 pm

Problem with view all bug page and all projects selected

Post by Tk421 » Jan 11, 2011 12:48 pm

Hello everybody.

I think iv'e found a little bug in mantis view bug page:

I've got a few users that have developer role in a project, but in the rest of projects are reporters. The configuration is set that Reporters can only access their own issues.

The problem is that when i access the "view issues" page with one of these users, if there is a project selected, the list of issues is correct. If user is a developer in project, the list shows all views, and if user is a reporter, only shows user's own issues; but if the option "all projects" is selected, the list shows all issues of all projects in which user is developer or user, even when user is a reporter in a project he can see al issues in project.

If he tries to access a issue of a project that is not of his property, the message "access denied" appears. This is correct, but i want to hide these issues in the "view issues" page.

I've hope you to undestand me and help me to resolve this "bug".

Sorry about my english, and thank you very much

Tk421
Posts: 7
Joined: Oct 06, 2010 1:22 pm

Re: Problem with view all bug page and all projects selected

Post by Tk421 » Jan 26, 2011 8:05 am

I've been trying to think about this, i've made some changes and an now the situation is the next:

· I've got 12 projects. All these projects have view_status "private".
· I've got also about 20 users. About 10 users are developers in some projects, and all the users have reporter access level in all the projects. The 10 developer users are reporters in the porjects in which they are not managers.
· The option "Limit reporter's access to ther own issues" is active.

Now let's go with the problem.

If there is a project selected, the view is correct, in the "my view" and in the "view issues" pages. If in the project, the user is reporter views only his own issues, and if he is developer, he can access all the issues in the project.
But when the "All Projects" option is selected, the user only sees the issues that he has reported (in all the projects he is reporter or developer). How can i get in this view the issues of projects in which user is a developer?

Thank you very much.

tiatorbert
Posts: 1
Joined: Feb 11, 2011 4:12 am

Re: Problem with view all bug page and all projects selected

Post by tiatorbert » Feb 11, 2011 4:19 am

Hi TK412,

I have the same problem. Have you found a solution?

Thanks.
Some like it hot,
Tia
My cover letter

stuarts
Posts: 1
Joined: Feb 12, 2011 9:15 am

Re: Problem with view all bug page and all projects selected

Post by stuarts » Feb 12, 2011 9:33 am

I'm having the same issue, anyone else?
Or should I ask has anyone been able to fix this?
Thanks

Tk421
Posts: 7
Joined: Oct 06, 2010 1:22 pm

Re: Problem with view all bug page and all projects selected

Post by Tk421 » May 18, 2011 12:58 pm

I've made a change that allows in this situation view issues in wich the user is reporter and the issues that reporter has assigned, this is not exactly what i was looking for, but helps me anyway:

In folder "core", edit the file "filter_api.php". Locate this code:

Code: Select all

if(( ON === $t_limit_reporters ) && ( !access_has_project_level( REPORTER + 1, $t_project_id, $t_user_id ) ) ) {
	$c_reporter_id = $c_user_id;
	$t_where_params[] = $c_reporter_id;
	array_push( $t_where_clauses, "($t_bug_table.reporter_id=" . db_param() . ')' );
}
And replace it with:

Code: Select all

if(( ON === $t_limit_reporters ) && ( !access_has_project_level( REPORTER + 1, $t_project_id, $t_user_id ) ) ) {
	$c_reporter_id = $c_user_id;
	$t_where_params[] = $c_reporter_id;
	$t_where_params[] = $c_reporter_id;
	array_push( $t_where_clauses, "($t_bug_table.reporter_id=" . db_param() . " OR $t_bug_table.handler_id=" . db_param()  . ')' );
}

Post Reply