Patch #2066

Default private status for project creation

Added by Benson M almost 12 years ago. Updated almost 12 years ago.

Status:ClosedStart date:2008-10-22
Priority:NormalDue 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 almost 12 years ago

  • Status changed from New to 7

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 almost 12 years ago

  • Status changed from 7 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