Hi all.
I have problem. If i logged as anonymous (reporter) user then show on view_all_bug_page.php select checkbox for tickets where i can operations Clone (to another project) and Add comment/s.
How i can disabled this functions for "reporter" or "Anonymous" in view_all_bug_page.php?
I located place in PHP where is... Have Mantis PHP command for lower role than DEVELOPER?
Thanks
Disable or hide Clone and Add Comments tickets
Moderators: Developer, Contributor
-
- Posts: 66
- Joined: 08 Jan 2019, 07:14
Disable or hide Clone and Add Comments tickets
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
-
- Posts: 66
- Joined: 08 Jan 2019, 07:14
Re: Disable or hide Clone and Add Comments tickets
My solution is:
changes columns_api.php (1097):
to:
etc.:
custom_function_api.php:
changes columns_api.php (1097):
Code: Select all
$g_checkboxes_exist = true;
echo '<div class="checkbox no-padding no-margin"><label>';
printf( '<input type="checkbox" name="bug_arr[]" value="%d" class="ace" />', $p_bug->id );
echo '<span class="lbl"></span>';
echo '</label></div>';
Code: Select all
if ( custom_function_my_group_by_project()) {
$g_checkboxes_exist = true;
echo '<div class="checkbox no-padding no-margin"><label>';
printf( '<input type="checkbox" name="bug_arr[]" value="%d" class="ace" />', $p_bug->id );
echo '<span class="lbl"></span>';
echo '</label></div>';
} else {
$g_checkboxes_exist = false;
}
custom_function_api.php:
Code: Select all
function custom_function_my_group_by_project(){
$m_access_level = access_get_project_level();
$m_group = ( $m_access_level == ADMINISTRATOR || $m_access_level == MANAGER );
return $m_group;
}
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english