forked from BrunoSpy/cmis_4_redmine_2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
executable file
·54 lines (42 loc) · 2 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
# Encoding: UTF-8
# Written by: Zuinq Studio
# Email: info@zuinqstudio.com
# Web: http://www.zuinqstudio.com
# This work is licensed under a Creative Commons Attribution 3.0 License.
# [ http://creativecommons.org/licenses/by/3.0/ ]
# This means you may use it for any purpose, and make any changes you like.
# All we ask is that you include a link back to our page in your credits.
# Last but not least, this project was supported by Bonsai Meme - http://www.bmeme.com
# Looking forward your comments and suggestions! info@zuinqstudio.com
require 'redmine'
require 'active_cmis'
#project setting tab
Rails.configuration.to_prepare do
require_dependency 'projects_helper'
unless ProjectsHelper.included_modules.include? CMISProjectsHelperPatch
ProjectsHelper.send(:include, CMISProjectsHelperPatch)
end
end
Redmine::Plugin.register :redmine_cmis do
name 'Redmine 3.x Cmis Plugin'
author 'Zuinq Studio'
description 'Store project files on your Cmis server'
version '0.0.3'
url 'http://www.zuinqstudio.com/en/funny-experiments-downloads'
author_url 'http://www.zuinqstudio.com'
menu :project_menu, :cmis, { :controller => 'cmis', :action => 'index' }, :caption => :cmis, :after => :documents, :param => :project_id
settings :default => {
'server_url' => 'http://alfresco.example.com:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom',
'repository_id' => '-default-',
'server_login' => 'user',
'server_password' => 'password',
'documents_path_base' => 'REDMINE',
'use_category' => true
}, :partial => 'settings/cmis_settings'
project_module :cmis do
permission :view_cmis_documents, {:cmis => [:index, :show, :download]}, :public => true
permission :manage_cmis_documents, :cmis => [:new, :edit, :destroy, :destroy_attachment, :synchronize, :synchronize_document, :import, :prepare_import, :add_attachment, :update_attachment]
permission :cmis_project_setting, {:cmis_project_setting => [:show, :update]}
end
raise 'active_cmis library not installed' unless defined?(ActiveCMIS)
end