forked from yakatz/redmine_private_wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
34 lines (29 loc) · 1.07 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
# -*- encoding : utf-8 -*-
require 'redmine'
require 'dispatcher'
require_dependency 'private_wiki/hook'
Dispatcher.to_prepare :chiliproject_private_wiki do
#unless Wiki.included_modules.include? PrivateWiki::WikiPagePatch
# Wiki.send(:include, PrivateWiki::WikiPagePatch)
#end
require_dependency 'wiki_page'
unless WikiPage.included_modules.include? PrivateWiki::WikiPagePatch
WikiPage.send(:include, PrivateWiki::WikiPagePatch)
end
require_dependency 'wiki_controller'
unless WikiController.included_modules.include? PrivateWiki::WikiControllerPatch
WikiController.send(:include, PrivateWiki::WikiControllerPatch)
end
end
Redmine::Plugin.register :chiliproject_private_wiki do
name 'Private Wiki'
author 'Oleg Kandaurov'
description 'Allows wiki pages to be set as private'
version '0.0.1'
url 'https://github.com/jnv/chiliproject_private_wiki'
author_url 'http://okandaurov.info'
project_module :wiki do
permission :view_private_wiki_pages, {}
permission :manage_private_wiki_pages, {:wiki => :change_privacy}, :require => :member
end
end