Hi,
In the default installation, only the administrator can add users in Mantis. Then the manager can add the new user in his project.
Is it possible to authorize a manager to add users in mantis and to assigne them to the manager's project (without the intervention of the administrator) ?
I can see in the "permission" page a check box in front of admin for the line "user management"... is it possible to add the manager ?
I hope you will understand my question ;-)
Thanks in advance for your help,
Regards,
Greg
can a manager add users in his project
Moderators: Developer, Contributor
You might find it in the config_defaults_inc.php file. There are a lot of settings in there that control who has the ability to do things within Mantis. For example, we wanted Managers to be able to create new projects, and we found it in there as
# Threshold needed to create a new project
$g_create_project_threshold = MANAGER;
If you want Managers to be able to have access to Manage Users, the way Administrators do you might be able to accomplish it by changing this to MANAGER or whatever level you want to be able to manage users:
# Threshold needed to manage user accounts
$g_manage_user_threshold = ADMINISTRATOR;
Otherwise, I think the config_defaults_inc.php file is a good place to look since it sets the controls on many access levels. (As always, I'd make a backup of your live file before making an edit, just in case you need to put it back the way it was.)
# Threshold needed to create a new project
$g_create_project_threshold = MANAGER;
If you want Managers to be able to have access to Manage Users, the way Administrators do you might be able to accomplish it by changing this to MANAGER or whatever level you want to be able to manage users:
# Threshold needed to manage user accounts
$g_manage_user_threshold = ADMINISTRATOR;
Otherwise, I think the config_defaults_inc.php file is a good place to look since it sets the controls on many access levels. (As always, I'd make a backup of your live file before making an edit, just in case you need to put it back the way it was.)
Maybe a bug?
Thank you preed but when i change this value in my config_inc file, my manager have no access to the user administration.
I check in the permissions report: the manager have the right to manage users. But in fact it doesn't work.
Maybe i have forgotten something?
Edit: When i use url direct access with the page manage_user_page.php, it works. My manager can manage the users.
But the top menu link is not manage_user_page.php but manage_proj_page.php. And in the adminsitration submenu, there is no link to manage_user_page.php.
Somebody can help me to understand please?
Thanks a lot.
Edit 2: I found something :roll:
Mantis v1.0.5.
In the html_api.php file, in the function print_manage_menu, i have this: line 639
As you can see, the access check doesn't use the parameters like that:
So i have never have the sub menu with the user manage link if i am not a admin even if i update the parameters manage_user_threshold.
I think it's a bug no?
I check in the permissions report: the manager have the right to manage users. But in fact it doesn't work.
Maybe i have forgotten something?
Edit: When i use url direct access with the page manage_user_page.php, it works. My manager can manage the users.
But the top menu link is not manage_user_page.php but manage_proj_page.php. And in the adminsitration submenu, there is no link to manage_user_page.php.
Somebody can help me to understand please?
Thanks a lot.
Edit 2: I found something :roll:
Mantis v1.0.5.
In the html_api.php file, in the function print_manage_menu, i have this: line 639
Code: Select all
PRINT '<br /><div align="center">';
if ( access_has_global_level( ADMINISTRATOR ) ) {
print_bracket_link( $t_manage_user_page, lang_get( 'manage_users_link' ) );
}
Code: Select all
if ( access_has_global_level( config_get( 'manage_user_threshold' ) ) ) {
print_bracket_link( $t_manage_user_page, lang_get( 'manage_users_link' ) );
}I think it's a bug no?
Last edited by starkeus on 16 Oct 2006, 08:35, edited 1 time in total.
I see what you mean. I am no programmer, but it seems that the manage_users_link has been restricted by this to be only shown to those with a global level of ADMINISTRATOR. I don't know why they chose to do it this way instead of like the others in the code you've shown, which all use the config_get and must get it from the config_defaults_inc.
In any case, as a trial you might change the code to something similar like the others to use the config_get and the manage_user_threshold so the manage users link would show up maybe.
As always, keep a backup of the original just in case it doesn't work.
In any case, as a trial you might change the code to something similar like the others to use the config_get and the manage_user_threshold so the manage users link would show up maybe.
As always, keep a backup of the original just in case it doesn't work.