Project

General

Profile

Feature #9029 » feature_9029_public_project_creation_role_permission.diff

Jérôme BATAILLE, 2011-08-12 12:34

View differences:

app/views/projects/_form.rhtml (copie de travail)
14 14
<br /><em><%= l(:text_length_between, :min => 1, :max => Project::IDENTIFIER_MAX_LENGTH) %> <%= l(:text_project_identifier_info) %></em>
15 15
<% end %></p>
16 16
<p><%= f.text_field :homepage, :size => 60 %></p>
17
<%
18
  #Ennder 2011-08-11 SM: #29527 RM: #9029 Disable public project creation on a rôle basis
19
  if User.current.allowed_to?(:add_public_project, @project, :global => false)
20
-%>
17 21
<p><%= f.check_box :is_public %></p>
22
<% else -%>
23
<%= f.hidden_field :is_public, :value => false %></p>
24
<% end -%>
18 25
<%= wikitoolbar_for 'project_description' %>
19 26

  
20 27
<% @project.custom_field_values.each do |value| %>
config/locales/es.yml (copie de travail)
863 863
  label_wiki_content_updated: Página wiki actualizada
864 864
  mail_body_wiki_content_updated: La página wiki '%{id}' ha sido actualizada por %{author}.
865 865
  permission_add_project: Crear proyecto
866
  permission_add_public_project: Crear proyecto público
866 867
  setting_new_project_user_role_id: Permiso asignado a un usuario no-administrador para crear proyectos
867 868
  label_view_all_revisions: Ver todas las revisiones
868 869
  label_tag: Etiqueta
config/locales/fr.yml (copie de travail)
372 372
  setting_gantt_items_limit: Nombre maximum d'éléments affichés sur le gantt
373 373
  
374 374
  permission_add_project: Créer un projet
375
  permission_add_public_project: Créer un projet public
375 376
  permission_add_subprojects: Créer des sous-projets
376 377
  permission_edit_project: Modifier le projet
377 378
  permission_select_project_modules: Choisir les modules
lib/redmine.rb (copie de travail)
50 50
  map.permission :view_project, {:projects => [:show], :activities => [:index]}, :public => true
51 51
  map.permission :search_project, {:search => :index}, :public => true
52 52
  map.permission :add_project, {:projects => [:new, :create]}, :require => :loggedin
53
  # Ennder 2011-08-11 SM: #29527 RM: #9029 Disable public project creation on a rôle basis
54
  map.permission :add_public_project, {:projects => [:new, :create]}, :require => :loggedin
53 55
  map.permission :edit_project, {:projects => [:settings, :edit, :update]}, :require => :member
54 56
  map.permission :select_project_modules, {:projects => :modules}, :require => :member
55 57
  map.permission :manage_members, {:projects => :settings, :members => [:new, :edit, :destroy, :autocomplete_for_member]}, :require => :member
(1-1/4)