How to make project read-only?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
grante
Posts: 18
Joined: 10 Apr 2015, 14:47

How to make project read-only?

Post by grante »

I need to switch a number of projects to "read-only".

[MantisBT 2.25.2 Schema 211]

Within those projects, nobody (even an admin) should be allowed to report a new issue or modify an existing issue in any way. Google has found that this question has been asked a number of times over the past 15 years, but there never seemed to be an good answer. One suggestion (from 10-12 years ago) was to add several dozen of lines of PHP to a config file, but the response to that was that it didn't work. I do want to preserve existing "view" privileges for users assigned to these "read-only" projects.

What is the recommended way to make a project read-only?

I've searched the admin guide and Wiki, and was unable to find anything relevant.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to make project read-only?

Post by atrol »

Select the project in project selection
Goto page Manage > Configuration > Workflow Tresholds
Uncheck all check boxes in rows "Report an issue" and "Update an issue"
Click "Update Configuration" on bottom of the page.
Please use Search before posting and read the Manual
grante
Posts: 18
Joined: 10 Apr 2015, 14:47

Re: How to make project read-only?

Post by grante »

atrol wrote: 07 Dec 2022, 16:40 Select the project in project selection
Goto page Manage > Configuration > Workflow Tresholds
Uncheck all check boxes in rows "Report an issue" and "Update an issue"
Click "Update Configuration" on bottom of the page.
That doesn't seem to work.

I did that (as admin).

Then I logged back in as a normal user and was able to add a note, change who the issue was assigned to, change the issue status, edit an old note, delete an attachment, etc.

I was unable to create a new issue, so I guess it partially worked.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to make project read-only?

Post by atrol »

Right, that's not enough, as this just disables updating issue summary and description.
You have to disable a lot more check boxes in sections "Issues", "Notes", "Tags" and "Attachments".
Please use Search before posting and read the Manual
grante
Posts: 18
Joined: 10 Apr 2015, 14:47

Re: How to make project read-only?

Post by grante »

atrol wrote: 07 Dec 2022, 17:21 You have to disable a lot more check boxes in sections "Issues", "Notes", "Tags" and "Attachments".
I was afraid of that. :/

I need to do this for dozens of projects, so it looks like I'm going to spend an afternoon clicking on checkboxes.

Or is there a way to copy the thresholds from one project to another?

Do sub-projects inherit their parent's thresholds?

It sure would be nice if there was a "read-only" toggle in a project's configuration...
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to make project read-only?

Post by atrol »

If you have less read-only projects than read-write project, you coould change the settings to read-only for "ALL PROJECTS" and enable read-write for the fewer remaining ones.

The settings are finally stored in database table mantis_config_table.
You could set one project in UI the way you want and copy the settings to other projects.
Please use Search before posting and read the Manual
grante
Posts: 18
Joined: 10 Apr 2015, 14:47

Re: How to make project read-only?

Post by grante »

atrol wrote: 07 Dec 2022, 17:40 If you have less read-only projects than read-write project, you coould change the settings to read-only for "ALL PROJECTS" and enable read-write for the fewer remaining ones.
Yes, I was thinking about that. I've been trying to figure out if/how configuration info is inherited by projects and sub-projects. The only mention in the admin guide that I can find of sub-projects inheriting anything is about versions and categories.
The settings are finally stored in database table mantis_config_table.
You could set one project in UI the way you want and copy the settings to other projects.
It would probably take me longer to figure out the right SQL commands to do that than it would to just click a couple hundred checkboxes.
grante
Posts: 18
Joined: 10 Apr 2015, 14:47

Re: How to make project read-only?

Post by grante »

I also tried setting the threshold where an issue becomes read-only to "new". That didn't really seem to do anything either. I could still modify issues whith state > new in all sorts of ways. What does it actually mean for an issue to be "read-only"? It seems like all of the changes I've tried to make on "read-only" issues have worked (add/delete notes, delete attachments, change status/assignment, etc.).
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to make project read-only?

Post by atrol »

You have to uncheck "Update readonly issues"
Please use Search before posting and read the Manual
grante
Posts: 18
Joined: 10 Apr 2015, 14:47

Re: How to make project read-only?

Post by grante »

atrol wrote: 07 Dec 2022, 18:53 You have to uncheck "Update readonly issues"
Would that prevent adding/deleting notes, adding/deleting attachments, changing issue state, assigning issue, adding/deleting monitors, etc.?

Or does "update issue" only refer to changing the summary and description?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to make project read-only?

Post by atrol »

Without other options disabled, you can still attach and detach tags, monitor and un-monitor, reopen and close.
Please use Search before posting and read the Manual
grante
Posts: 18
Joined: 10 Apr 2015, 14:47

Re: How to make project read-only?

Post by grante »

So there are a dozen or two ways to change/modify an issue, but the only thing that's included in "updating an issue" is changing the summary or description?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: How to make project read-only?

Post by atrol »

grante wrote: 08 Dec 2022, 15:43but the only thing that's included in "updating an issue" is changing the summary or description?
No, you cannot change some more fields, e.g. Category, View Status, Priority, Severity, Reproducibility and Resolution.
Please use Search before posting and read the Manual
Post Reply