Project

General

Profile

Patch #5668 » invite.patch

The invitation feature path (testet on tag 0.9.4) - Aaron Fischer, 2010-06-10 22:50

View differences:

app/controllers/members_controller.rb
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class MembersController < ApplicationController
before_filter :find_member, :except => [:new, :autocomplete_for_member]
before_filter :find_project, :only => [:new, :autocomplete_for_member]
before_filter :find_member, :except => [:new, :autocomplete_for_member, :invite]
before_filter :find_project, :only => [:new, :autocomplete_for_member, :invite]
before_filter :authorize
def invite
@project.members << Member.new(:user_id => params[:user], :role_ids => params[:role])
flash[:notice] = l(:user_added_to_project)
redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project
end
def new
members = []
if params[:member] && request.post?
app/controllers/projects_controller.rb
}
end
end
def request_invitation
(@project.principals.select {|user| user.allowed_to?(:manage_members, @project)}).each do |u|
Mailer.deliver_request_invitation(User.current, @project, u)
end
flash[:notice] = l(:request_was_sucessfully_sent)
redirect_to :controller => 'projects', :action => 'show', :id => @project
end
# Add a new project
def add
app/models/mailer.rb
render_multipart('inactive_reminder', body)
end
def request_invitation user, project, receiver
set_language_if_valid(receiver.language)
recipients receiver.mail
subject "[#{Setting.app_title.to_s} - #{l(:authorisation_request)}] #{project.name}"
body :project => project,
:url => url_for(:controller => 'members', :action => 'invite', :id => project),
:user => user
render_multipart('request_invitation', body)
end
private
def initialize_defaults(method_name)
super
app/views/mailer/request_invitation.text.html.rhtml
<%= t(:mail_body_project_invation_request, :user => @user, :project => @project.name) %>
<% Role.find(:all, :conditions => {:builtin => 0}).each do |role| %>
<a href="<%= @url %>?user=<%= @user.id %>&role=<%= role.id %>"><%= t(:add_as_role, :role => role.name) %></a>
<% end %>
app/views/mailer/request_invitation.text.plain.rhtml
<%= t(:mail_body_project_invation_request, :user => @user, :project => @project.name) %>
<% Role.find(:all, :conditions => {:builtin => 0}).each do |role| %>
<%= t(:add_as_role, :role => role.name) %>
<%= @url %>?user=<%= @user.id %>&role=<%= role.id %>
<% end %>
app/views/projects/show.rhtml
<div class="contextual">
<% unless User.current.member_of? @project %>
<%= link_to t(:send_authorisation_request), {:controller => 'projects', :action => 'request_invitation', :id => @project}, :class => 'icon icon-lock' %>
<% end %>
<% if User.current.allowed_to?(:add_subprojects, @project) %>
<%= link_to l(:label_subproject_new), {:controller => 'projects', :action => 'add', :parent_id => @project}, :class => 'icon icon-add' %>
<% end %>
config/locales/bg.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/bs.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/ca.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/cs.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/da.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/de.yml
archiviert. Falls Sie das Projekt "{{project}}" noch benötigen, klicken sie auf folgenden Link,
um es wieder zu aktivieren.
permission_reactivate_project: Projekt reaktivieren.
request_was_sucessfully_sent: "Die Anfrage wurde verschickt. Warten sie auf die Freischaltung"
authorisation_request: Beitrittsanfrage
add_as_role: "Hinzufügen als {{role}}"
send_authorisation_request: "Beitrittsanfrage senden"
user_added_to_project: "Benutzer wurde dem Projekt hinzugefügt"
mail_body_project_invation_request: "{{user}} stelld eine Anfrage auf Freischaltung für das Projekt {{project}}"
config/locales/el.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/en.yml
enumeration_activities: Activities (time tracking)
enumeration_system_activity: System Activity
user_added_to_project: User added to project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
send_authorisation_request: Send authorisation request
add_as_role: "Add as {{role}}:"
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}."
config/locales/es.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/fi.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/fr.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/gl.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/he.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/hr.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/hu.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/id.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/it.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/ja.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/ko.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/lt.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/nl.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/no.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/pl.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/pt-BR.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/pt.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/ro.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/ru.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/sk.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/sl.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/sr.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/sv.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/th.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/tr.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/uk.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/vi.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/zh-TW.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/locales/zh.yml
mail_subject_project_activity_warning: Activity reminder
mail_body_project_activity_warning: Your project '{{project}}' has no activity for a month. If you still need the project, click the following link, otherwise the project will be archived in 14 days.
permission_reactivate_project: Reactivate Project
request_was_sucessfully_sent: Your request was successfully sent. Please wait for authorization
authorisation_request: Authorisation request
add_as_role: "Add as {{role}}:"
send_authorisation_request: Send authorisation request
user_added_to_project: User added to project
mail_body_project_invation_request: "{{user}} requested authorisation for project {{project}}"
config/routes.rb
end
map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new'
map.connect 'projects/:id/members/invite', :controller => 'members', :action => 'invite'
map.with_options :controller => 'users' do |users|
users.with_options :conditions => {:method => :get} do |user_views|
......
project_views.connect 'projects/:id/categories/new', :action => 'add_issue_category'
project_views.connect 'projects/:id/settings/:tab', :action => 'settings'
project_views.connect 'projects/:id/reactivate', :action => 'reactivate'
project_views.connect 'projects/:id/request_invitation', :action => 'request_invitation'
end
projects.with_options :action => 'activity', :conditions => {:method => :get} do |activity|
lib/redmine.rb
# Permissions
Redmine::AccessControl.map do |map|
map.permission :view_project, {:projects => [:show, :activity]}, :public => true
map.permission :view_project, {:projects => [:show, :activity, :request_invitation]}, :public => true
map.permission :search_project, {:search => :index}, :public => true
map.permission :add_project, {:projects => :add}, :require => :loggedin
map.permission :edit_project, {:projects => [:settings, :edit]}, :require => :member
map.permission :select_project_modules, {:projects => :modules}, :require => :member
map.permission :manage_members, {:projects => :settings, :members => [:new, :edit, :destroy, :autocomplete_for_member]}, :require => :member
map.permission :manage_members, {:projects => :settings, :members => [:new, :invite, :edit, :destroy, :autocomplete_for_member]}, :require => :member
map.permission :manage_versions, {:projects => [:settings, :add_version], :versions => [:edit, :close_completed, :destroy]}, :require => :member
map.permission :add_subprojects, {:projects => :add}, :require => :member
map.permission :reactivate_project, {:projects => :reactivate}, :require => :member
    (1-1/1)