View Issue Details

IDProjectCategoryView StatusLast Update
0023339mantisbtdocumentationpublic2017-12-07 12:10
Reportercovfefe Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Product Version2.0.0 
Summary0023339: User real name can't be fetched as Manager (or lower than Admin in general)
Description

I have an account that accesses my Mantis via the API for fetching data of several issues of some projects. Recently I lowered the permission
of this account from Admin to Manager due to security concerns, however I have customized the visibility of private projects
in a way that Managers can also see private projects like Admins can do. This I have done under "Manage"->"Manage Configuration"->"Configuration Report"
Configuration Option: private_project_threshold; Value: 70; Type: integer; User name: All users; Project name: All projects

However this account cannot fetch the realname of users anymore via the API, only the username and ID. I could not find any hint in the documentation or in the Web UI (also not in the adm_permissions_report.php) that this is the case when I reduce the permission to Manager, so I wasn't aware of this.

Neither of this Configuration Options changed that (note that 1 stands for ON, meaning it a boolean value and 70 is the ID of the manager role):

All Users All Projects show_realname integer 1 (note: this I have from here https://www.mantisbt.org/forums/viewtopic.php?f=2&t=6153
All Users All Projects private_bug_threshold integer 70
All Users All Projects private_bugnote_threshold integer 70
(note: the latter two are listed here: http://www.mantisbt.org/docs/master-1.2.x/en/administration_guide.html#ADMIN.CONFIG.STATUS)

Steps To Reproduce

I tried out by myself with this Java code snippet

IssueData issue_to_replace_the_reporter = mantisconnection.getIssue(random_mantis_bug_id); // mantisconnection is the connection object on which I invoke mc_issue_get

IssueNoteData[] notes_of_issue = issue_to_replace_the_reporter.getNotes();
for(int i = 0; i < notes_of_issue.length; i++)
{
System.out.println("Author of note nr." + i + " is " + notes_of_issue[i].getReporter().getId() + ", " + notes_of_issue[i].getReporter().getName() + "," + notes_of_issue[i].getReporter().getReal_name());
} // end for

TagsNo tags attached.

Relationships

related to 0011399 new Deprecate $g_show_realname and use $g_show_user_realname_threshold instead 

Activities

atrol

atrol

2017-09-11 09:00

developer   ~0057676

Adding the following line to config_inc.php (or using the configuration page) should fix the issue

$g_show_user_realname_threshold = MANAGER;
covfefe

covfefe

2017-09-11 10:56

reporter   ~0057682

Thank you very much atrol!
It did the trick!

Can you give me the link to the documentation in which this option is listed?
This option has gone completely under my radar.

atrol

atrol

2017-09-12 16:12

developer   ~0057703

The option is not documented at the moment.

note: the latter two are listed here: http://www.mantisbt.org/docs/master-1.2.x/en/administration_guide.html#ADMIN.CONFIG.STATUS

You should use the documentation for 2.x if you are using 2.x.
Use the one that is part of your installation or read online https://www.mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/