Project

General

Profile

Actions

Patch #2066

closed

Default private status for project creation

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

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

0%

Estimated time:

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?

Actions #1

Updated by Tommy Jensen over 15 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" }%>

Actions #2

Updated by Jean-Philippe Lang over 15 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.

Actions

Also available in: Atom PDF