Page 1 of 1
can a manager add users in his project
Posted: 03 May 2006, 08:18
by El_Greg
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
Posted: 13 Oct 2006, 14:03
by starkeus
Hi,
i'm interested of this feature too.
Is it possible to think about it for future version?
Thanks a lot
Posted: 13 Oct 2006, 18:23
by preed
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.)
Posted: 16 Oct 2006, 07:08
by El_Greg
Thanks for your help,
I will look at that very soon... I was exploring the LDAP capabilities but wil maybe need that anyway.
Thanks again.
Greg
Maybe a bug?
Posted: 16 Oct 2006, 07:48
by starkeus
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
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' ) );
}
As you can see, the access check doesn't use the parameters like that:
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' ) );
}
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?
Posted: 16 Oct 2006, 08:34
by starkeus
i post a new bug for that
#7519
Posted: 16 Oct 2006, 21:24
by preed
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.