Upload attachment in bugnote for viewers [v2.23.0]

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
YanBos
Posts: 2
Joined: 09 Mar 2022, 09:29

Upload attachment in bugnote for viewers [v2.23.0]

Post by YanBos »

Hello,

We are deploying Mantis application in our organisation and face an issue: users with viewer rights cannot upload bugnotes on an issue they have not created, no matter if it is a Public or Private. The "Upload Files" box on bugnotes is not available for them. When they are the creator of the issue, it is working fine.

We've read a few threads on this issue and even though it seems similar, we haven't found a solution to our problem yet :
https://www.mantisbt.org/forums/viewtop ... ach#p69470
https://www.mantisbt.org/bugs/view.php?id=22817

General config we didn't touch :
$g_upload_bug_file_threshold=REPORTER
$g_allow_reporter_upload =ON

Our config :
$g_default_project_view_status = VS_PRIVATE;
$g_default_bug_view_status = VS_PRIVATE;
$g_access_levels_enum_string = '10:viewer,55:developer,70:manager,90:administrator';

We tried the following :
1) -> Didn't work
$g_default_bug_view_status = VS_PUBLIC; (back to default setting)

2) -> Didn't work
$g_upload_bug_file_threshold=VIEWER;

3) -> Didn't work
$g_default_bug_view_status = VS_PUBLIC;
$g_upload_bug_file_threshold=VIEWER;

4) -> Didn't work even though we thought this was a clever idea !
$g_allow_viewer_upload = ON

We have the feeling that it is linked to below configuration :

Any clever idea ?

Thanks for your help !
Attachments
Mantis Permissions.png
Mantis Permissions.png (18.71 KiB) Viewed 1472 times
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Upload attachment in bugnote for viewers [v2.23.0]

Post by cas »

This how it should look, using $g_upload_bug_file_threshold=VIEWER :
files.PNG
files.PNG (17.94 KiB) Viewed 1471 times
Not sure where your internal/external come from.
This setting $g_allow_viewer_upload, I do not have but I am running 2.24 and 2.25
This leads me to believe you have made more changes than you are showing in this issue report.
YanBos
Posts: 2
Joined: 09 Mar 2022, 09:29

Re: Upload attachment in bugnote for viewers [v2.23.0]

Post by YanBos »

Hello cas,

Thanks for your answer !
Internal/External comes from following modification in ../lang/strings_english.txt :

Code: Select all

$s_access_levels_enum_string ='10: External, 55:Internal,70:Project Manager,90:Administrator';
Seems to just be related to display :

Code: Select all

$s_access_levels_enum_string ='10: viewer, 55:Internal,70:Project Manager,90:Administrator';
Mantis Permissions.png
Mantis Permissions.png (13.75 KiB) Viewed 1458 times
We did a new try with default settings for $g_access_levels_enum_string

Code: Select all

$g_access_levels_enum_string = '10:viewer,25:reporter,40:updater,55:developer,70:manager,90:administrator';
$g_upload_bug_file_threshold=VIEWER
Mantis Permissions modification.png
Mantis Permissions modification.png (15.33 KiB) Viewed 1458 times
We see there is a display issue since we didn't define @25@ and @40@ in $s_access_levels_enum_string, but "Update issue attachments" is still not available for External (equivalent to 10:viewer). :(

Below is our entire config with removed infos :

Code: Select all

$g_hostname               = -;
$g_db_type                = -;
$g_database_name          = -;
$g_db_username            = -;
$g_db_password            = -;

$g_db_table_plugin_prefix   = -;
$g_db_table_suffix          = -;

$g_default_timezone       = -;


$g_crypto_master_salt     = -;

/**
 * Maximum file size (bytes) that can be uploaded.
 * Also check your PHP settings (default is usually 2MBs)
 * @global integer $g_max_file_size
 */
$g_file_upload_method = DATABASE;
$g_max_file_size = 32000000;

$g_default_project_view_status = VS_PRIVATE;
$g_default_bug_view_status = VS_PRIVATE;

$g_access_levels_enum_string = '10:viewer,55:developer,70:manager,90:administrator';

$g_preview_attachments_inline_max_size = 1000000;
$g_upload_bug_file_treshold = VIEWER;
$g_antispam_max_event_count = 50;
~
Last edited by YanBos on 09 Mar 2022, 14:59, edited 1 time in total.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Upload attachment in bugnote for viewers [v2.23.0]

Post by cas »

Well, may I suggest to open up the administrator guide on page 76, Custom Fields :mrgreen:
Your definition changes have not been implemented correctly, you missed out on the custom_strings_inc.php entirely, at least so it looks.
I am quite sure once you made the correct changes, it will work as expected.
YanBos
Posts: 2
Joined: 09 Mar 2022, 09:29

Re: Upload attachment in bugnote for viewers [v2.23.0]

Post by YanBos »

Hello cas,

Thanks again for your feedback ! I was going to reply that the different tries we did didn't work and then as we read the code again, we found the typo ...

$g_upload_bug_file_treshold = VIEWER; is pretty useless, $g_upload_bug_file_threshold = VIEWER; works wonder.

Thanks again for your help !
YanBos
Post Reply