adm_config_report, anonymous and custom fields

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
truefriend-cz
Posts: 66
Joined: 08 Jan 2019, 07:14

adm_config_report, anonymous and custom fields

Post by truefriend-cz »

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.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: adm_config_report, anonymous and custom fields

Post by cas »

view access is based upon roles not on user account :roll:
truefriend-cz
Posts: 66
Joined: 08 Jan 2019, 07:14

Re: adm_config_report, anonymous and custom fields

Post by truefriend-cz »

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 6413 times
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: adm_config_report, anonymous and custom fields

Post by cas »

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: 66
Joined: 08 Jan 2019, 07:14

Re: adm_config_report, anonymous and custom fields

Post by truefriend-cz »

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.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: adm_config_report, anonymous and custom fields

Post by cas »

Just go to manage users and lookup the anonymous account :mrgreen:
truefriend-cz
Posts: 66
Joined: 08 Jan 2019, 07:14

Re: adm_config_report, anonymous and custom fields

Post by truefriend-cz »

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.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: adm_config_report, anonymous and custom fields

Post by cas »

This is on various places, n :( ot just one place
truefriend-cz
Posts: 66
Joined: 08 Jan 2019, 07:14

Re: adm_config_report, anonymous and custom fields

Post by truefriend-cz »

Do you can present one (maybe bigest) place from all? Other places I will try to find and edit myself.
Mantis version: 2.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: adm_config_report, anonymous and custom fields

Post by cas »

scan the php scripts for "anonymous" and you will find all 36 of them.
truefriend-cz
Posts: 66
Joined: 08 Jan 2019, 07:14

Re: adm_config_report, anonymous and custom fields

Post by truefriend-cz »

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.23.0, OS: Windows, PHP: 7.3, Charset (PHP, Database): UTF-8, and: little, bad english
Post Reply