adm_config_report, anonymous and custom fields

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
truefriend-cz
Posts: 65
Joined: Jan 08, 2019 2:14 am

adm_config_report, anonymous and custom fields

Post by truefriend-cz » Feb 03, 2019 4:00 am

Hi all.
I have problem. How i can define for anonymous user only show one custom field for all project?
I testing and using adm_config_report.php, bug_report_page_fields as complex but i dont know how configuring.
Thanx

And i find in custom fileds bug with atrol user.
https://www.mantisbt.org/bugs/view.php?id=25184
Maybe problem from this iusse.
Mantis version: 2.19.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english

cas
Posts: 622
Joined: Mar 11, 2006 11:08 am
Contact:

Re: adm_config_report, anonymous and custom fields

Post by cas » Feb 03, 2019 4:05 am

view access is based upon roles not on user account :roll:

truefriend-cz
Posts: 65
Joined: Jan 08, 2019 2:14 am

Re: adm_config_report, anonymous and custom fields

Post by truefriend-cz » Feb 03, 2019 4:12 am

But adm_config_report.php in inputs section have selector for settings by user.
Screenshot_2019-02-03-10-16-15.png
Screenshot_2019-02-03-10-16-15.png (90.89 KiB) Viewed 1313 times
Mantis version: 2.19.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english

cas
Posts: 622
Joined: Mar 11, 2006 11:08 am
Contact:

Re: adm_config_report, anonymous and custom fields

Post by cas » Feb 03, 2019 4:50 am

This way you will have to do that for most pages since what you are doing will only work for the bug_report_page, not for the bug_view_page.
The way that works is according these rules
* 1. value from cache
* 2. value from database
* looks for specified config_id + current user + current project.
* if not found, config_id + current user + all_project
* if not found, config_id + default user + current project
* if not found, config_id + default user + all_project.
* 3.use GLOBAL[config_id]
Since you are fiddling around with teh anonymous account this may not work since that is a protected account which cannot change preferences.
So you can check the account settings, most likely it is protected. Making it unprotected might work.............

truefriend-cz
Posts: 65
Joined: Jan 08, 2019 2:14 am

Re: adm_config_report, anonymous and custom fields

Post by truefriend-cz » Feb 03, 2019 6:06 am

Mmm... Do you can help my for change php code to excluding (enabling this feature) for protected account/s?
Where is area (in scripts) for this defined?
Mantis version: 2.19.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english

cas
Posts: 622
Joined: Mar 11, 2006 11:08 am
Contact:

Re: adm_config_report, anonymous and custom fields

Post by cas » Feb 03, 2019 6:18 am

Just go to manage users and lookup the anonymous account :mrgreen:

truefriend-cz
Posts: 65
Joined: Jan 08, 2019 2:14 am

Re: adm_config_report, anonymous and custom fields

Post by truefriend-cz » Feb 03, 2019 6:29 am

I want stayed protecting account settings.
Or if i set to unprotected then stay restrict changing password, user info, etc. Where is apply defining anonymous user from config file?

I can not testing now but after maybe one hour.
Mantis version: 2.19.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english

cas
Posts: 622
Joined: Mar 11, 2006 11:08 am
Contact:

Re: adm_config_report, anonymous and custom fields

Post by cas » Feb 03, 2019 6:34 am

This is on various places, n :( ot just one place

truefriend-cz
Posts: 65
Joined: Jan 08, 2019 2:14 am

Re: adm_config_report, anonymous and custom fields

Post by truefriend-cz » Feb 03, 2019 7:22 am

Do you can present one (maybe bigest) place from all? Other places I will try to find and edit myself.
Mantis version: 2.19.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english

cas
Posts: 622
Joined: Mar 11, 2006 11:08 am
Contact:

Re: adm_config_report, anonymous and custom fields

Post by cas » Feb 03, 2019 7:30 am

scan the php scripts for "anonymous" and you will find all 36 of them.

truefriend-cz
Posts: 65
Joined: Jan 08, 2019 2:14 am

Re: adm_config_report, anonymous and custom fields

Post by truefriend-cz » Feb 03, 2019 10:31 am

I tested now.
After set to unprotected no solved this problem. (for any arrays (no custom fields only)).

Problem have anonymous account after this:

Code: Select all

$g_allow_anonymous_login = ON;
$g_anonymous_account = 'anonymous';
to config_inc.php only. And any other account if set in config_inc.php as anonymously.
Mantis version: 2.19.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english

Post Reply