##// END OF EJS Templates
Add write control on repository from Redmine interface...
Add write control on repository from Redmine interface * new methods to add/remove rights in app/models/role.rb * some unit tests * add write check in Redmine.pm To keep compatibility migration add write rights to non builtin roles but default clean install give write access only to manager and developer, not to reporter. git-svn-id: http://redmine.rubyforge.org/svn/branches/nbc@1791 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r1789:f5f51f4f832d
r1789:f5f51f4f832d
Show More
redmine.rb
150 lines | 8.5 KiB | text/x-ruby | RubyLexer
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 require 'redmine/access_control'
require 'redmine/menu_manager'
Jean-Philippe Lang
Activity refactoring....
r1692 require 'redmine/activity'
Jean-Philippe Lang
Text files can now be viewed online when browsing the repository....
r518 require 'redmine/mime_type'
Jean-Philippe Lang
Estimated time recognizes improved time formats (#1092)....
r1346 require 'redmine/core_ext'
Jean-Philippe Lang
Added basic Theme support....
r807 require 'redmine/themes'
Jean-Philippe Lang
Merged hooks branch @ r1785 into trunk....
r1785 require 'redmine/hook'
Jean-Philippe Lang
Basic plugin support....
r741 require 'redmine/plugin'
Jean-Philippe Lang
Added basic support for CVS and Mercurial SCMs....
r556
Jean-Philippe Lang
Gantt chart can now be exported to a graphic file (png)....
r660 begin
Jean-Philippe Lang
Fixed: RMagick not loaded on case sensitive filesystems....
r730 require_library_or_gem 'RMagick' unless Object.const_defined?(:Magick)
Jean-Philippe Lang
Gantt chart can now be exported to a graphic file (png)....
r660 rescue LoadError
# RMagick is not available
end
Jean-Philippe Lang
Adds Filesystem adapter (patch #1393 by Paul R)....
r1494 REDMINE_SUPPORTED_SCM = %w( Subversion Darcs Mercurial Cvs Bazaar Git Filesystem )
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663
# Permissions
Redmine::AccessControl.map do |map|
Jean-Philippe Lang
Removed ProjectsController#feeds. This view was incomplete and inconsistent with permissions....
r776 map.permission :view_project, {:projects => [:show, :activity]}, :public => true
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 map.permission :search_project, {:search => :index}, :public => true
map.permission :edit_project, {:projects => [:settings, :edit]}, :require => :member
Jean-Philippe Lang
Added project module concept....
r714 map.permission :select_project_modules, {:projects => :modules}, :require => :member
map.permission :manage_members, {:projects => :settings, :members => [:new, :edit, :destroy]}, :require => :member
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 map.permission :manage_versions, {:projects => [:settings, :add_version], :versions => [:edit, :destroy]}, :require => :member
Jean-Philippe Lang
Added project module concept....
r714 map.project_module :issue_tracking do |map|
# Issue categories
map.permission :manage_categories, {:projects => [:settings, :add_issue_category], :issue_categories => [:edit, :destroy]}, :require => :member
# Issues
Jean-Philippe Lang
ProjectsController#list_issues, #export_issues_csv and #export_issues_pdf merged into IssuesController#index...
r874 map.permission :view_issues, {:projects => [:changelog, :roadmap],
:issues => [:index, :changes, :show, :context_menu],
Jean-Philippe Lang
Added version details view accessible from the roadmap....
r942 :versions => [:show, :status_by],
Jean-Philippe Lang
Added project module concept....
r714 :queries => :index,
:reports => :issue_report}, :public => true
Jean-Philippe Lang
ProjectsController#add_issue moved to IssuesController#new....
r1066 map.permission :add_issues, {:issues => :new}
Jean-Philippe Lang
Adds a Reply link to each issue note (#739). Reply is pre-filled with the quoted note....
r1466 map.permission :edit_issues, {:issues => [:edit, :reply, :bulk_edit, :destroy_attachment]}
Jean-Philippe Lang
Anonymous users can now be allowed to create, edit, comment issues, comment news and post messages in the forums....
r906 map.permission :manage_issue_relations, {:issue_relations => [:new, :destroy]}
Jean-Philippe Lang
Adds a Reply link to each issue note (#739). Reply is pre-filled with the quoted note....
r1466 map.permission :add_issue_notes, {:issues => [:edit, :reply]}
Jean-Philippe Lang
Added the following permissions (#527, #585, #627):...
r1138 map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin
Jean-Philippe Lang
Issue list now supports bulk edit/move/delete (#563, #607). For now, issues from different projects can not be bulk edited/moved/deleted at once....
r1116 map.permission :move_issues, {:issues => :move}, :require => :loggedin
Jean-Philippe Lang
Added project module concept....
r714 map.permission :delete_issues, {:issues => :destroy}, :require => :member
# Queries
Jean-Philippe Lang
Fixed: Manage pu(b)lic queries typo (Thomas Lecavelier)....
r767 map.permission :manage_public_queries, {:queries => [:new, :edit, :destroy]}, :require => :member
Jean-Philippe Lang
Added project module concept....
r714 map.permission :save_queries, {:queries => [:new, :edit, :destroy]}, :require => :loggedin
# Gantt & calendar
map.permission :view_gantt, :projects => :gantt
map.permission :view_calendar, :projects => :calendar
Jean-Philippe Lang
Adds permissions for viewing the watcher list and adding new watchers on the issue detail view (#398)....
r1711 # Watchers
map.permission :view_issue_watchers, {}
map.permission :add_issue_watchers, {:watchers => :new}
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :time_tracking do |map|
map.permission :log_time, {:timelog => :edit}, :require => :loggedin
map.permission :view_time_entries, :timelog => [:details, :report]
Jean-Philippe Lang
Adds 2 permissions (closes #859):...
r1235 map.permission :edit_time_entries, {:timelog => [:edit, :destroy]}, :require => :member
map.permission :edit_own_time_entries, {:timelog => [:edit, :destroy]}, :require => :loggedin
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :news do |map|
Jean-Philippe Lang
ProjectsController#add_news moved to NewsController#new....
r1097 map.permission :manage_news, {:news => [:new, :edit, :destroy, :destroy_comment]}, :require => :member
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875 map.permission :view_news, {:news => [:index, :show]}, :public => true
Jean-Philippe Lang
Anonymous users can now be allowed to create, edit, comment issues, comment news and post messages in the forums....
r906 map.permission :comment_news, {:news => :add_comment}
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :documents do |map|
Jean-Philippe Lang
Moved ProjectsController#list_documents and add_document to DocumentsController#index and new....
r998 map.permission :manage_documents, {:documents => [:new, :edit, :destroy, :add_attachment, :destroy_attachment]}, :require => :loggedin
map.permission :view_documents, :documents => [:index, :show, :download]
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :files do |map|
map.permission :manage_files, {:projects => :add_file, :versions => :destroy_file}, :require => :loggedin
map.permission :view_files, :projects => :list_files, :versions => :download
end
map.project_module :wiki do |map|
map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member
map.permission :rename_wiki_pages, {:wiki => :rename}, :require => :member
map.permission :delete_wiki_pages, {:wiki => :destroy}, :require => :member
Jean-Philippe Lang
Added wiki annotate view. It's accessible for each version from the page history view. ...
r1007 map.permission :view_wiki_pages, :wiki => [:index, :history, :diff, :annotate, :special]
Jean-Philippe Lang
Added project module concept....
r714 map.permission :edit_wiki_pages, :wiki => [:edit, :preview, :add_attachment, :destroy_attachment]
Jean-Philippe Lang
Wiki page protection (#851, patch #1146 by Mateo Murphy with slight changes)....
r1400 map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :repository do |map|
Jean-Philippe Lang
'Manage repository' permission requires to be a project member....
r796 map.permission :manage_repository, {:repositories => [:edit, :destroy]}, :require => :member
Jean-Philippe Lang
Added Annotate/Blame view for Subversion, CVS and Mercurial repositories....
r934 map.permission :browse_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph]
Jean-Philippe Lang
Added project module concept....
r714 map.permission :view_changesets, :repositories => [:show, :revisions, :revision]
Nicolas Chuche
Add write control on repository from Redmine interface...
r1789 map.permission :commit_access, {}
Jean-Philippe Lang
Added project module concept....
r714 end
map.project_module :boards do |map|
map.permission :manage_boards, {:boards => [:new, :edit, :destroy]}, :require => :member
map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true
Jean-Philippe Lang
Adds posts quoting functionality (#1825)....
r1771 map.permission :add_messages, {:messages => [:new, :reply, :quote]}
Jean-Philippe Lang
Forums enhancements:...
r913 map.permission :edit_messages, {:messages => :edit}, :require => :member
map.permission :delete_messages, {:messages => :destroy}, :require => :member
Jean-Philippe Lang
Added project module concept....
r714 end
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 end
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 Redmine::MenuManager.map :top_menu do |menu|
Jean-Philippe Lang
Fixed: Home, Logout, Login links are absolute (#1122, #1145)....
r1369 menu.push :home, :home_path, :html => { :class => 'home' }
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 menu.push :my_page, { :controller => 'my', :action => 'page' }, :html => { :class => 'mypage' }, :if => Proc.new { User.current.logged? }
menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural, :html => { :class => 'projects' }
Jean-Philippe Lang
Admin and Help links at the end of top menu....
r1647 menu.push :administration, { :controller => 'admin', :action => 'index' }, :html => { :class => 'admin' }, :if => Proc.new { User.current.admin? }, :last => true
menu.push :help, Redmine::Info.help_url, :html => { :class => 'help' }, :last => true
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 end
Redmine::MenuManager.map :account_menu do |menu|
Jean-Philippe Lang
Fixed: Home, Logout, Login links are absolute (#1122, #1145)....
r1369 menu.push :login, :signin_path, :html => { :class => 'login' }, :if => Proc.new { !User.current.logged? }
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 menu.push :register, { :controller => 'account', :action => 'register' }, :html => { :class => 'register' }, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
menu.push :my_account, { :controller => 'my', :action => 'account' }, :html => { :class => 'myaccount' }, :if => Proc.new { User.current.logged? }
Jean-Philippe Lang
Fixed: Home, Logout, Login links are absolute (#1122, #1145)....
r1369 menu.push :logout, :signout_path, :html => { :class => 'logout' }, :if => Proc.new { User.current.logged? }
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 end
Redmine::MenuManager.map :application_menu do |menu|
# Empty
end
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 Redmine::MenuManager.map :project_menu do |menu|
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 menu.push :overview, { :controller => 'projects', :action => 'show' }
menu.push :activity, { :controller => 'projects', :action => 'activity' }
Jean-Philippe Lang
Do not show Roadmap menu item if the project doesn't define any versions....
r1093 menu.push :roadmap, { :controller => 'projects', :action => 'roadmap' },
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 :if => Proc.new { |p| p.versions.any? }
Jean-Philippe Lang
Highlight the current item of the main menu....
r1062 menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
Jean-Philippe Lang
Added a 'New issue' link in the main menu (accesskey 7)....
r1067 menu.push :new_issue, { :controller => 'issues', :action => 'new' }, :param => :project_id, :caption => :label_issue_new,
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
Jean-Philippe Lang
Highlight the current item of the main menu....
r1062 menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural
menu.push :documents, { :controller => 'documents', :action => 'index' }, :param => :project_id, :caption => :label_document_plural
menu.push :wiki, { :controller => 'wiki', :action => 'index', :page => nil },
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 :if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
Jean-Philippe Lang
Highlight the current item of the main menu....
r1062 menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id,
:if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural
menu.push :files, { :controller => 'projects', :action => 'list_files' }, :caption => :label_attachment_plural
menu.push :repository, { :controller => 'repositories', :action => 'show' },
Jean-Philippe Lang
The following menus can now be extended by plugins: top_menu, account_menu, application_menu (empty by default)....
r1123 :if => Proc.new { |p| p.repository && !p.repository.new_record? }
Jean-Philippe Lang
Menu mapper: add support for :before, :after and :last options to #push method and add #delete method....
r1646 menu.push :settings, { :controller => 'projects', :action => 'settings' }, :last => true
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 end
Jean-Philippe Lang
Activity refactoring....
r1692
Redmine::Activity.map do |activity|
activity.register :issues, :class_name => %w(Issue Journal)
activity.register :changesets
activity.register :news
activity.register :documents, :class_name => %w(Document Attachment)
activity.register :files, :class_name => 'Attachment'
activity.register :wiki_pages, :class_name => 'WikiContent::Version', :default => false
activity.register :messages, :default => false
end