Patch #2066

Default private status for project creation

Added by Benson M over 3 years ago. Updated over 3 years ago.

Status:Closed Start date:2008-10-22
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-

Description

Is it possible to have the default status of the project to be private and if its possible how can one change that? Does the function is_public (<%= f.check_box :is_public %>) have anything to do with this?

History

#1 Updated by Tommy Jensen over 3 years ago

  • Status changed from New to Assigned

This is possible.

Quote Rails API:
Returns a checkbox tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). It‘s intended that method returns an integer and if that integer is above zero, then the checkbox is checked. Additional options on the input tag can be passed as a hash with options. The checked_value defaults to 1 while the default unchecked_value is set to 0 which is convenient for boolean values. Since HTTP standards say that unchecked checkboxes don‘t post anything, we add a hidden value with the same name as the checkbox as a work around.

Thus
In the view, the <%= f.check_box :is_public > can be replaced by <= f.check_box :is_public options = { checked_value="1" }%>

#2 Updated by Jean-Philippe Lang over 3 years ago

  • Status changed from Assigned to Closed
  • Assignee deleted (Tommy Jensen)

I don't kwnow which version of Redmine you're using but this option can be set in application settings.
It's called 'New projects are public by default' and was committed in r1235.
Check this option and the 'Public' checkbox will be unchecked by default when creating a new project.

Also available in: Atom PDF