-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
68 lines (56 loc) · 2.46 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# encoding: utf-8
#
# Redmine plugin to export an issue as a .eml file
#
# Copyright © 2018 Stephan Wenzel <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
require 'redmine'
Redmine::Plugin.register :redmine_issue_to_email do
name 'Redmine Issue to Email'
author 'Stephan Wenzel'
description 'This is a plugin for Redmine to to export an issue as a .eml file'
version '1.0.1'
url 'https://github.com/HugoHasenbein/redmine_issue_to_email'
author_url 'https://github.com/HugoHasenbein/redmine_issue_to_email'
# link to settings page
# 0 - apple / thunderbird mix - experimental - code not in this repository
# 1 - apple mail compatibility
# 2 - thunderbird compatibility kept identical to outlook in this repository
# 3 - outlook compatibility - kept identical to thunderbird in this repository
settings :default => {
'export_compatibility' => "2",
'export_user' => "1" # likely admin or first user will always exist
},
:partial => 'settings/settings'
# manage permissions -> Redmine->Administration->Roles and permissions
project_module :redmine_issue_to_email do
permission :edit_issue_to_email_settings,
:issue_to_email_settings => [:edit, :destroy, :update, :test_imap]
permission :store_issue_to_email,
:issues => [:store, :bulk_store]
end
end
require "redmine_issue_to_email"
### Change-Log
# * **1.0.1**
# * added security measures against unauthorized access
# * added redirect to login for unauthorized access
# * corrected typos in localization strings
# * added conversion of attachments urls next to present conversion of attachment paths
# * added feature to allow for empty host string in global Redmine settings
#
# * **1.0.0** running on Redmine 3.4.6