Set BT to readonly cause it is a mirror

Get help from other users here.

Moderators: Contributor, Developer

Post Reply
rakekniven
Posts: 17
Joined: Mar 19, 2010 2:05 am

Set BT to readonly cause it is a mirror

Post by rakekniven » Mar 19, 2010 3:29 am

Hello,

we offer a mirror for nearly all services in our intranet.
These mirrors are only for emergency and read only.
MySQL works fine as a master slave.
So I copied Mantis to my mirror machine and it works fine as well.
But users are able to make changes.
Is it possible to set my Mantis mirror to read only somehow?

Best regards.

P.S. We use Mantis version 1.1.8

atrol
Site Admin
Posts: 7351
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Set BT to readonly cause it is a mirror

Post by atrol » Mar 21, 2010 10:09 am

Set all users to role "Viewer"
Please use Search before posting and read the Manual

rakekniven
Posts: 17
Joined: Mar 19, 2010 2:05 am

Re: Set BT to readonly cause it is a mirror

Post by rakekniven » Mar 22, 2010 2:59 am

Changing user role results in db changes, or?
This is not working for me cause dbs are mirrored in realtime using master-slave function of MySQL.

Any other ways?

Best regards

atrol
Site Admin
Posts: 7351
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Set BT to readonly cause it is a mirror

Post by atrol » Mar 22, 2010 6:42 am

I didn't try with 1.1.8 but 1.2.0, maybe not all configuration is available.
Add the following lines to your config_inc.php

Code: Select all

	$g_update_bug_threshold	= NOBODY;
	$g_handle_bug_threshold	= NOBODY;
	$g_bug_reminder_threshold = NOBODY;
	$g_upload_bug_file_threshold = NOBODY;
	$g_add_bugnote_threshold = NOBODY;
	$g_update_bugnote_threshold = NOBODY;
	$g_delete_bug_threshold = NOBODY;
	$g_bugnote_allow_user_edit_delete = OFF;
	$g_report_bug_threshold	= NOBODY;
	$g_update_bug_threshold	= NOBODY;
	$g_monitor_bug_threshold = NOBODY;
	$g_monitor_add_others_bug_threshold = NOBODY;
	$g_monitor_delete_others_bug_threshold = NOBODY;
	$g_move_bug_threshold = NOBODY;
	$g_roadmap_update_threshold = NOBODY;
	$g_update_bug_status_threshold = NOBODY;
	$g_reopen_bug_threshold	= NOBODY;
	$g_set_bug_sticky_threshold	= NOBODY;
	$g_tag_attach_threshold = NOBODY;
	$g_tag_detach_threshold = NOBODY;
	$g_tag_detach_own_threshold = NOBODY;
	$g_tag_create_threshold = NOBODY;
Please use Search before posting and read the Manual

rakekniven
Posts: 17
Joined: Mar 19, 2010 2:05 am

Re: Set BT to readonly cause it is a mirror

Post by rakekniven » Mar 25, 2010 5:18 am

We still use 1.1.8 and had no luck using this parameters.

Switching MySQL slave server to read_only brought the solution and Mantis works fine.

Now Mediawiki has a problem but that doesn't belong here ;-)

Best regards

atrol
Site Admin
Posts: 7351
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Set BT to readonly cause it is a mirror

Post by atrol » Mar 25, 2010 6:52 am

Nice to hear that you found a solution,
I also had this idea, but I never tried whether the error handling of MantisBT would be in a way, that is accepted by users and does not lead to further problems. (like those you have with Mediawiki)

For 1.2.0 this solution might not be the best idea because you will lose some functionality.
Users are able to configure the columns they see in various pages and reports.
This information is stored in database.

TBH I am no specialist of mySQL and not knowing whether it's possible to set READ/ONLY per table or just for the whole instance.

If this is possible per table, maybe this could also be the solution for your Mediawiki.
Please use Search before posting and read the Manual

Post Reply