How to add new roles in Mantis?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
DaVinci
Posts: 95
Joined: 13 Apr 2007, 07:39

How to add new roles in Mantis?

Post by DaVinci »

i want to add three new roles/access level in mantis and then define access for thise two roles..
were do i go to add new rols so that they will be available in the User Administration meny and can be assigned to a new user?
im suning Mantis 1.1.0
smig1o
Posts: 39
Joined: 30 Nov 2006, 12:26
Location: Poznan - PL
Contact:

Re: How to add new roles in Mantis?

Post by smig1o »

You need to change $g_access_level_enum_string; i.e:
$g_access_levels_enum_string = '10:viewer,25:reporter,40:updater,55:developer,60:task manager,70:manager,90:administrator';
You should put modified version in your config_inc.php.

Here I've added task manager role. then you need to find
$s_access_level_enum_string and add it there too.

Now go to administration page and set rights, etc.
'Press any key to continue or any other key to quit'
DaVinci
Posts: 95
Joined: 13 Apr 2007, 07:39

Re: How to add new roles in Mantis?

Post by DaVinci »

what do u mean by that i have to put the modified version in config_inc.php?
if u meant that i have to put <b>$g_access_levels_enum_string = '10:viewer,25:reporter,40:updater,55:developer,60:task manager,70:manager,90:administrator';
</b> in config_inc.php then i have done that..
and
i have also modified the string in: config_default_inc.php and in the local translation file


after the modifications i get: @60@ in the access-level menu instead of Task Manager

what did i do wrong?
smig1o
Posts: 39
Joined: 30 Nov 2006, 12:26
Location: Poznan - PL
Contact:

Re: How to add new roles in Mantis?

Post by smig1o »

DaVinci wrote:what do u mean by that i have to put the modified version in config_inc.php?
if u meant that i have to put <b>$g_access_levels_enum_string = '10:viewer,25:reporter,40:updater,55:developer,60:task manager,70:manager,90:administrator';
</b> in config_inc.php then i have done that..
Good!
DaVinci wrote: and
i have also modified the string in: config_default_inc.php and in the local translation file
after the modifications i get: @60@ in the access-level menu instead of Task Manager

what did i do wrong?
value from config_inc.php overwrites the one from config_default_inc.php. You shouldnt touch config_default_inc.php.

@60@ means that Mantis didnt find 60 in $s_access_level_enum_string in your strings_*.txt.
Check this again
'Press any key to continue or any other key to quit'
DaVinci
Posts: 95
Joined: 13 Apr 2007, 07:39

Re: How to add new roles in Mantis?

Post by DaVinci »

thankyou..
its working now :)
smig1o
Posts: 39
Joined: 30 Nov 2006, 12:26
Location: Poznan - PL
Contact:

Re: How to add new roles in Mantis?

Post by smig1o »

DaVinci wrote:thankyou..
its working now :)
Great :)
'Press any key to continue or any other key to quit'
JoeyJoe
Posts: 2
Joined: 16 Feb 2009, 13:46

Re: How to add new roles in Mantis?

Post by JoeyJoe »

So...

What is the resolution to the @60@ problem that you experienced? And how did you get it to "it's working now..."??
Searching this forum for @60@ is impossible.
DaVinci
Posts: 95
Joined: 13 Apr 2007, 07:39

Re: How to add new roles in Mantis?

Post by DaVinci »

i forgot to add the rolls in language file
it works now after i did that
spacomp
Posts: 14
Joined: 17 Jan 2012, 13:20

Re: How to add new roles in Mantis?

Post by spacomp »

This was really helpful.

I have a role created which like this

ADMINISTRATOR < COORDINATOR > MANAGER

COORDINATOR is in the middle of Manager and a Admin.

Now I want to give the "COORDINATOR" a privilege to

1. Create Users
2. Create Project
3. Manage Custom Fields

And most other things that a ADMIN can do but a MANAGER cannot do.

I am getting a error when updated with the THRESHOLD in the "config_defaults_in.php"
judan
Posts: 14
Joined: 14 Jan 2013, 18:26
Location: Georgetown, Guyana
Contact:

Re: How to add new roles in Mantis?

Post by judan »

spacomp you should never edit config_defaults_in.php. All changes must go in config_inc.php. This is because the values in config_inc.php will overwrite those in config_defaults_in. And also if something goes wrong you will need the defaults file to restore mantis to original state.
~Jailall~
judan
Posts: 14
Joined: 14 Jan 2013, 18:26
Location: Georgetown, Guyana
Contact:

Re: How to add new roles in Mantis?

Post by judan »

Can someone tell me what is the significance of the numbers before each role? e.g 10:viewer,25:reporter,40:updater. Does these numbers matter? If i were to add a new role what number should i put?
~Jailall~
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to add new roles in Mantis?

Post by atrol »

Please use Search before posting and read the Manual
bamaustin2000
Posts: 4
Joined: 28 May 2019, 18:59

Re: How to add new roles in Mantis?

Post by bamaustin2000 »

the above message suffered linkrot since 2013 (go figure!)

Section 7.3 Enumerations of the MantisBT Admin Guide can now be found at:
https://www.mantisbt.org/docs/master/en ... mize.enums
Post Reply