From: Jens H. <jen...@ya...> - 2006-04-19 20:37:22
|
Hi, I've just installed Mantis Version 1.0.2 and I've detected that it still presents all reporters in the filter list. In private project cases it may be not nice, if every user can see any other reporter, even if it is only reporter for a totally seperated project. (i.E. if you install a project for a customer, the user can see currently an other user from any other company with set up projects) I've modified project_api.php in the following way: function project_get_all_user_rows( $p_project_id = ALL_PROJECTS, $p_access_level = ANYBODY ) { .... .... $t_adm = ADMINISTRATOR; $t_users = array(); if( $c_project_id == ALL_PROJECTS ) { $t_user_id = auth_get_current_user_id(); $query = "SELECT u.id, u.username, u.realname, u.access_level FROM $t_user_table u, $t_project_user_list_table l WHERE u.enabled = $t_on AND u.access_level $t_global_access_clause AND l.user_id=u.id AND (l.project_id in (select project_id from $t_project_user_list_table where user_id = $t_user_id ))"; } else { $query = "SELECT id, username, realname, access_level FROM $t_user_table WHERE enabled = $t_on AND access_level $t_global_access_clause"; } $result = db_query( $query ); .... ..... } This works well in my configuration. I'm not sure yet, if the change interferes some other functionality. Jens |