RE: Where does Redmine determine if the Repository tab is... ยป add_project-custom-field_public_repo-r3625.patch
app/controllers/projects_controller.rb (working copy) | ||
---|---|---|
73 | 73 |
@project.identifier = Project.next_identifier if Setting.sequential_project_identifiers? |
74 | 74 |
@project.trackers = Tracker.all |
75 | 75 |
@project.is_public = Setting.default_projects_public? |
76 |
@project.public_repo = Setting.default_projects_public? |
|
76 | 77 |
@project.enabled_module_names = Setting.default_projects_modules |
77 | 78 |
else |
78 | 79 |
@project.enabled_module_names = params[:enabled_modules] |
app/views/projects/_form.rhtml (working copy) | ||
---|---|---|
15 | 15 |
<% end %></p> |
16 | 16 |
<p><%= f.text_field :homepage, :size => 60 %></p> |
17 | 17 |
<p><%= f.check_box :is_public %></p> |
18 |
<p><%= f.check_box :public_repo %></p> |
|
18 | 19 |
<%= wikitoolbar_for 'project_description' %> |
19 | 20 | |
20 | 21 |
<% @project.custom_field_values.each do |value| %> |
config/locales/en.yml (working copy) | ||
---|---|---|
279 | 279 |
field_group_by: Group results by |
280 | 280 |
field_sharing: Sharing |
281 | 281 |
field_parent_issue: Parent task |
282 |
field_public_repo: Public Repository |
|
282 | 283 |
|
283 | 284 |
setting_app_title: Application title |
284 | 285 |
setting_app_subtitle: Application subtitle |
... | ... | |
380 | 381 |
permission_browse_repository: Browse repository |
381 | 382 |
permission_view_changesets: View changesets |
382 | 383 |
permission_commit_access: Commit access |
384 |
permission_manage_private_repository: Manage private repository |
|
385 |
permission_browse_private_repository: Browse private repository |
|
386 |
permission_view_private_changesets: View private changesets |
|
387 |
permission_private_commit_access: Private commit access |
|
383 | 388 |
permission_manage_boards: Manage boards |
384 | 389 |
permission_view_messages: View messages |
385 | 390 |
permission_add_messages: Post messages |
db/migrate/20100328203018_add_project_field_public_repo.rb (revision 0) | ||
---|---|---|
1 |
class AddProjectFieldPublicRepo < ActiveRecord::Migration |
|
2 |
def self.up |
|
3 |
add_column :projects, :public_repo, :boolean, :null => false, :default => true |
|
4 |
end |
|
5 | ||
6 |
def self.down |
|
7 |
remove_column :projects, :public_repo |
|
8 |
end |
|
9 |
end |
lib/redmine.rb (working copy) | ||
---|---|---|
113 | 113 |
map.permission :browse_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph] |
114 | 114 |
map.permission :view_changesets, :repositories => [:show, :revisions, :revision] |
115 | 115 |
map.permission :commit_access, {} |
116 |
map.permission :manage_private_repository, {:repositories => [:edit, :committers, :destroy]}, :require => :member |
|
117 |
map.permission :browse_private_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph] |
|
118 |
map.permission :view_private_changesets, :repositories => [:show, :revisions, :revision] |
|
119 |
map.permission :private_commit_access, {} |
|
116 | 120 |
end |
117 | 121 | |
118 | 122 |
map.project_module :boards do |map| |
lib/redmine/default_data/loader.rb (working copy) | ||
---|---|---|
72 | 72 |
:manage_files, |
73 | 73 |
:browse_repository, |
74 | 74 |
:view_changesets, |
75 |
:commit_access] |
|
75 |
:commit_access, |
|
76 |
:browse_private_repository, |
|
77 |
:view_private_changesets, |
|
78 |
:private_commit_access] |
|
76 | 79 |
|
77 | 80 |
reporter = Role.create! :name => l(:default_role_reporter), |
78 | 81 |
:position => 3, |
... | ... | |
92 | 95 |
:edit_own_messages, |
93 | 96 |
:view_files, |
94 | 97 |
:browse_repository, |
95 |
:view_changesets] |
|
98 |
:view_changesets, |
|
99 |
:browse_private_repository, |
|
100 |
:view_private_changesets] |
|
96 | 101 |
|
97 | 102 |
Role.non_member.update_attribute :permissions, [:view_issues, |
98 | 103 |
:add_issues, |
test/fixtures/roles.yml (working copy) | ||
---|---|---|
50 | 50 |
- :browse_repository |
51 | 51 |
- :manage_repository |
52 | 52 |
- :view_changesets |
53 |
- :browse_private_repository |
|
54 |
- :manage_private_repository |
|
55 |
- :view_private_changesets |
|
53 | 56 |
- :manage_project_activities |
54 | 57 | |
55 | 58 |
position: 1 |
... | ... | |
95 | 98 |
- :manage_files |
96 | 99 |
- :browse_repository |
97 | 100 |
- :view_changesets |
101 |
- :browse_private_repository |
|
102 |
- :view_private_changesets |
|
98 | 103 | |
99 | 104 |
position: 2 |
100 | 105 |
roles_003: |
... | ... | |
133 | 138 |
- :manage_files |
134 | 139 |
- :browse_repository |
135 | 140 |
- :view_changesets |
141 |
- :browse_private_repository |
|
142 |
- :view_private_changesets |
|
136 | 143 | |
137 | 144 |
position: 3 |
138 | 145 |
roles_004: |