summaryrefslogtreecommitdiffstats
path: root/lib/tasks/email.rake
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-19 14:08:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-19 14:08:48 +0000
commit06ca18b04225a68769ab742900ec74ce776c2e86 (patch)
tree72db2b3b95bd049da95e0f257ec77514d835f099 /lib/tasks/email.rake
parent9d120c872c1b5849d987e3950f2cf914e1e34fe2 (diff)
downloadredmine-06ca18b04225a68769ab742900ec74ce776c2e86.tar.gz
redmine-06ca18b04225a68769ab742900ec74ce776c2e86.zip
Adds a 'no_permission_check' option to the MailHandler.
Used with the 'project' option, it allows anyone to submit emails to a private inbox project (#4407). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3195 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks/email.rake')
-rw-r--r--lib/tasks/email.rake6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/tasks/email.rake b/lib/tasks/email.rake
index 487ce506b..37fbd4261 100644
--- a/lib/tasks/email.rake
+++ b/lib/tasks/email.rake
@@ -27,6 +27,8 @@ General options:
ignore: email is ignored (default)
accept: accept as anonymous user
create: create a user account
+ no_permission_check=1 disable permission checking when receiving
+ the email
Issue attributes control options:
project=PROJECT identifier of the target project
@@ -55,6 +57,7 @@ END_DESC
%w(project status tracker category priority).each { |a| options[:issue][a.to_sym] = ENV[a] if ENV[a] }
options[:allow_override] = ENV['allow_override'] if ENV['allow_override']
options[:unknown_user] = ENV['unknown_user'] if ENV['unknown_user']
+ options[:no_permission_check] = ENV['no_permission_check'] if ENV['no_permission_check']
MailHandler.receive(STDIN.read, options)
end
@@ -68,6 +71,8 @@ General options:
ignore: email is ignored (default)
accept: accept as anonymous user
create: create a user account
+ no_permission_check=1 disable permission checking when receiving
+ the email
Available IMAP options:
host=HOST IMAP server host (default: 127.0.0.1)
@@ -123,6 +128,7 @@ END_DESC
%w(project status tracker category priority).each { |a| options[:issue][a.to_sym] = ENV[a] if ENV[a] }
options[:allow_override] = ENV['allow_override'] if ENV['allow_override']
options[:unknown_user] = ENV['unknown_user'] if ENV['unknown_user']
+ options[:no_permission_check] = ENV['no_permission_check'] if ENV['no_permission_check']
Redmine::IMAP.check(imap_options, options)
end