Page 1 of 1

adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 09:00
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.

Re: adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 09:05
by cas
view access is based upon roles not on user account :roll:

Re: adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 09:12
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 6404 times

Re: adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 09:50
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.............

Re: adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 11:06
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?

Re: adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 11:18
by cas
Just go to manage users and lookup the anonymous account :mrgreen:

Re: adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 11:29
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.

Re: adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 11:34
by cas
This is on various places, n :( ot just one place

Re: adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 12:22
by truefriend-cz
Do you can present one (maybe bigest) place from all? Other places I will try to find and edit myself.

Re: adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 12:30
by cas
scan the php scripts for "anonymous" and you will find all 36 of them.

Re: adm_config_report, anonymous and custom fields

Posted: 03 Feb 2019, 15:31
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.