-
Notifications
You must be signed in to change notification settings - Fork 25
/
init.rb
54 lines (47 loc) · 2.65 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
# Meetings plugin for Redmine
# Copyright (C) 2011 Arnaud MARTEL
#
# 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.
#
#Contributors:
# Daniel Munn (Redmine 2.0.0)
require 'redmine'
require 'redmine_meetings'
require 'meetings_calendar'
Redmine::Plugin.register :redmine_meetings do
name 'Meetings plugin'
author 'Arnaud Martel'
description 'plugin to manage meetings in REDMINE'
version '0.2.6'
requires_redmine :version_or_higher => '2.0.3'
settings :default => {'bbb_server' => '', 'bbb_salt' => '', 'bbb_timeout' => '3', 'meeting_timezone' => 'Paris', 'bbb_recording' => ''}, :partial => 'meetings_settings/settings'
project_module :meetings do
permission :meetings_settings, {:meetings_settings => [:show, :update]}
permission :view_meeting_doodles, {:meetings => [:show_doodle]}
permission :manage_doodle, {:meetings => [:new_doodle, :create_doodle, :edit_doodle, :update_doodle, :delete_doodle, :preview_doodle]}
permission :answer_doodle, {:meetings => [:answer_doodle]}
permission :view_meetings, {:meetings => [:show_meeting, :export_meeting, :export_meetings]}
permission :manage_meeting, {:meetings => [:new_meeting, :create_meeting, :edit_meeting, :update_meeting, :delete_meeting, :preview_meeting]}
permission :join_conference, :meetings => :join_conference
permission :start_conference, {:meetings => [:start_conference, :delete_conference]}
permission :meeting, { :meetings => :index}, :public => true
permission :conference_moderator, {}
permission :view_recorded_conference, {}
end
menu :project_menu, :meetings, { :controller => 'meetings', :action => 'index' }, :param => :project_id, :caption => :meetings, :if => Proc.new { |p| User.current.allowed_to?(:view_meeting_doodles, p) || User.current.allowed_to?(:view_meetings, p) || User.current.allowed_to?(:join_conference, p) }
# Meetings are added to the activity view
activity_provider :meetings, :class_name => 'Meeting', :default => false
Redmine::Search.available_search_types << 'meetings'
end