Commit 553c8b41 authored by jplang's avatar jplang

New permission: view news (#7068).

Patch by Felix Schäfer.

git-svn-id: https://svn.redmine.org/redmine/trunk@16639 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1cac3cb2
......@@ -926,6 +926,7 @@ de:
permission_manage_files: Dateien verwalten
permission_manage_issue_relations: Ticket-Beziehungen verwalten
permission_manage_members: Mitglieder verwalten
permission_view_news: News ansehen
permission_manage_news: News verwalten
permission_manage_project_activities: Aktivitäten (Zeiterfassung) verwalten
permission_manage_public_queries: Öffentliche Filter verwalten
......
......@@ -497,6 +497,7 @@ en:
permission_view_time_entries: View spent time
permission_edit_time_entries: Edit time logs
permission_edit_own_time_entries: Edit own time logs
permission_view_news: View news
permission_manage_news: Manage news
permission_comment_news: Comment news
permission_view_documents: View documents
......
......@@ -509,6 +509,7 @@ fr:
permission_view_time_entries: Voir le temps passé
permission_edit_time_entries: Modifier les temps passés
permission_edit_own_time_entries: Modifier son propre temps passé
permission_view_news: Voir les annonces
permission_manage_news: Gérer les annonces
permission_comment_news: Commenter les annonces
permission_view_documents: Voir les documents
......
......@@ -427,6 +427,7 @@ ja:
permission_edit_time_entries: 作業時間の編集
permission_edit_own_time_entries: 自身が記入した作業時間の編集
permission_manage_project_activities: 作業分類 (時間管理) の管理
permission_view_news: ニュースの閲覧
permission_manage_news: ニュースの管理
permission_comment_news: ニュースへのコメント
permission_view_documents: 文書の閲覧
......
class AddViewNewsToAllExistingRoles < ActiveRecord::Migration
def up
Role.all.each { |role| role.add_permission! :view_news }
end
def down
# nothing to revert
end
end
......@@ -131,7 +131,7 @@ Redmine::AccessControl.map do |map|
end
map.project_module :news do |map|
map.permission :view_news, {:news => [:index, :show]}, :public => true, :read => true
map.permission :view_news, {:news => [:index, :show]}, :read => true
map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy], :attachments => :upload}, :require => :member
map.permission :comment_news, {:comments => :create}
end
......
......@@ -65,6 +65,7 @@ module Redmine
:view_calendar,
:log_time,
:view_time_entries,
:view_news,
:comment_news,
:view_documents,
:view_wiki_pages,
......@@ -91,6 +92,7 @@ module Redmine
:view_calendar,
:log_time,
:view_time_entries,
:view_news,
:comment_news,
:view_documents,
:view_wiki_pages,
......@@ -109,6 +111,7 @@ module Redmine
:view_gantt,
:view_calendar,
:view_time_entries,
:view_news,
:comment_news,
:view_documents,
:view_wiki_pages,
......@@ -123,6 +126,7 @@ module Redmine
:view_gantt,
:view_calendar,
:view_time_entries,
:view_news,
:view_documents,
:view_wiki_pages,
:view_wiki_edits,
......
......@@ -36,6 +36,7 @@ roles_001:
- :view_time_entries
- :edit_time_entries
- :delete_time_entries
- :view_news
- :manage_news
- :comment_news
- :view_documents
......@@ -92,6 +93,7 @@ roles_002:
- :log_time
- :view_time_entries
- :edit_own_time_entries
- :view_news
- :manage_news
- :comment_news
- :view_documents
......@@ -137,6 +139,7 @@ roles_003:
- :view_calendar
- :log_time
- :view_time_entries
- :view_news
- :manage_news
- :comment_news
- :view_documents
......@@ -174,6 +177,7 @@ roles_004:
- :view_calendar
- :log_time
- :view_time_entries
- :view_news
- :comment_news
- :view_documents
- :view_wiki_pages
......@@ -200,6 +204,7 @@ roles_005:
- :view_gantt
- :view_calendar
- :view_time_entries
- :view_news
- :view_documents
- :view_wiki_pages
- :view_wiki_edits
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment