The customized user is also selected in E-mail Notification

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
lchydp
Posts: 38
Joined: 11 Apr 2013, 14:21
Location: China

The customized user is also selected in E-mail Notification

Post by lchydp »

Hello moderator,
I met a problem in the setting of "E-mail Notification" if I use a customized user recently.I define the customized user according to the following steps,
1.Define a new role,CMO,in core/constant_inc.php
# access levels
define( 'ANYBODY', 0 );
define( 'VIEWER', 10 );
define( 'REPORTER', 25 );
define( 'UPDATER', 40 );
define( 'DEVELOPER', 55 );
define( 'CMO', 60 );//new role
define( 'MANAGER', 70 );
define( 'ADMINISTRATOR', 90 );
define( 'NOBODY', 100 );
2.Insert the new role into $g_access_levels_enum_string in config_defaults_inc.php
$g_access_levels_enum_string = '10:viewer,25:reporter,40:updater,55:developer,60:CMO,70:manager,90:administrator';//CMO is the new role.
3.Insert the new role into $s_access_levels_enum_string in lang/strings_english.txt
$s_access_levels_enum_string = '10:viewer,25:reporter,40:updater,55:developer,60:CMO,70:manager,90:administrator';
After did these,the customized user 'CMO' could be shown in MantisBT.
Then I navigated to 'Manage--Manage Configuration--E-mail Notifications'.I found if I checked a user whose access level < CMO and checked a user whose access level > CMO in a line,all the users between them would be selected!For example,only the users in the red rectangles in this picture is set by me.All other selected users are checked worngly.
users.JPG
users.JPG (26.29 KiB) Viewed 5423 times
How to resolve this problem?Thank you very much!
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: The customized user is also selected in E-mail Notificat

Post by atrol »

The behavior is confusing and caused by the internal design which allow just setting minimum and maximum access levels but not individual levels.
http://www.mantisbt.org/bugs/view.php?id=6249
Please use Search before posting and read the Manual
lchydp
Posts: 38
Joined: 11 Apr 2013, 14:21
Location: China

Re: The customized user is also selected in E-mail Notificat

Post by lchydp »

So it means I can' set the notification just for reporter and manager only if I modify the internal design,isn't it?
atrol wrote:The behavior is confusing and caused by the internal design which allow just setting minimum and maximum access levels but not individual levels.
http://www.mantisbt.org/bugs/view.php?id=6249
atrol
Site Admin
Posts: 8536
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: The customized user is also selected in E-mail Notificat

Post by atrol »

lchydp wrote:So it means I can' set the notification just for reporter and manager only if I modify the internal design,isn't it?
Yes, the design has to be changed. The current internal approach is that you have just a minimum and maximum access level.
Please use Search before posting and read the Manual
lchydp
Posts: 38
Joined: 11 Apr 2013, 14:21
Location: China

Re: The customized user is also selected in E-mail Notificat

Post by lchydp »

Thank you very much! :)
atrol wrote:
lchydp wrote:So it means I can' set the notification just for reporter and manager only if I modify the internal design,isn't it?
Yes, the design has to be changed. The current internal approach is that you have just a minimum and maximum access level.
Post Reply