##// END OF EJS Templates
Replaces repository_enable named scope on Project with a more generic one: has_module....
Jean-Philippe Lang -
r1803:231e98f0c758
parent child
Show More
@@ -1,47 +1,47
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class SysController < ActionController::Base
18 class SysController < ActionController::Base
19 wsdl_service_name 'Sys'
19 wsdl_service_name 'Sys'
20 web_service_api SysApi
20 web_service_api SysApi
21 web_service_scaffold :invoke
21 web_service_scaffold :invoke
22
22
23 before_invocation :check_enabled
23 before_invocation :check_enabled
24
24
25 # Returns the projects list, with their repositories
25 # Returns the projects list, with their repositories
26 def projects_with_repository_enabled
26 def projects_with_repository_enabled
27 Project.repository_enabled(:all, :include => :repository, :order => 'identifier')
27 Project.has_module(:repository).find(:all, :include => :repository, :order => 'identifier')
28 end
28 end
29
29
30 # Registers a repository for the given project identifier
30 # Registers a repository for the given project identifier
31 # (Subversion specific)
31 # (Subversion specific)
32 def repository_created(identifier, url)
32 def repository_created(identifier, url)
33 project = Project.find_by_identifier(identifier)
33 project = Project.find_by_identifier(identifier)
34 # Do not create the repository if the project has already one
34 # Do not create the repository if the project has already one
35 return 0 unless project && project.repository.nil?
35 return 0 unless project && project.repository.nil?
36 logger.debug "Repository for #{project.name} was created"
36 logger.debug "Repository for #{project.name} was created"
37 repository = Repository.factory('Subversion', :project => project, :url => url)
37 repository = Repository.factory('Subversion', :project => project, :url => url)
38 repository.save
38 repository.save
39 repository.id || 0
39 repository.id || 0
40 end
40 end
41
41
42 protected
42 protected
43
43
44 def check_enabled(name, args)
44 def check_enabled(name, args)
45 Setting.sys_api_enabled?
45 Setting.sys_api_enabled?
46 end
46 end
47 end
47 end
@@ -1,268 +1,268
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class Project < ActiveRecord::Base
18 class Project < ActiveRecord::Base
19 # Project statuses
19 # Project statuses
20 STATUS_ACTIVE = 1
20 STATUS_ACTIVE = 1
21 STATUS_ARCHIVED = 9
21 STATUS_ARCHIVED = 9
22
22
23 has_many :members, :include => :user, :conditions => "#{User.table_name}.status=#{User::STATUS_ACTIVE}"
23 has_many :members, :include => :user, :conditions => "#{User.table_name}.status=#{User::STATUS_ACTIVE}"
24 has_many :users, :through => :members
24 has_many :users, :through => :members
25 has_many :enabled_modules, :dependent => :delete_all
25 has_many :enabled_modules, :dependent => :delete_all
26 has_and_belongs_to_many :trackers, :order => "#{Tracker.table_name}.position"
26 has_and_belongs_to_many :trackers, :order => "#{Tracker.table_name}.position"
27 has_many :issues, :dependent => :destroy, :order => "#{Issue.table_name}.created_on DESC", :include => [:status, :tracker]
27 has_many :issues, :dependent => :destroy, :order => "#{Issue.table_name}.created_on DESC", :include => [:status, :tracker]
28 has_many :issue_changes, :through => :issues, :source => :journals
28 has_many :issue_changes, :through => :issues, :source => :journals
29 has_many :versions, :dependent => :destroy, :order => "#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC"
29 has_many :versions, :dependent => :destroy, :order => "#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC"
30 has_many :time_entries, :dependent => :delete_all
30 has_many :time_entries, :dependent => :delete_all
31 has_many :queries, :dependent => :delete_all
31 has_many :queries, :dependent => :delete_all
32 has_many :documents, :dependent => :destroy
32 has_many :documents, :dependent => :destroy
33 has_many :news, :dependent => :delete_all, :include => :author
33 has_many :news, :dependent => :delete_all, :include => :author
34 has_many :issue_categories, :dependent => :delete_all, :order => "#{IssueCategory.table_name}.name"
34 has_many :issue_categories, :dependent => :delete_all, :order => "#{IssueCategory.table_name}.name"
35 has_many :boards, :dependent => :destroy, :order => "position ASC"
35 has_many :boards, :dependent => :destroy, :order => "position ASC"
36 has_one :repository, :dependent => :destroy
36 has_one :repository, :dependent => :destroy
37 has_many :changesets, :through => :repository
37 has_many :changesets, :through => :repository
38 has_one :wiki, :dependent => :destroy
38 has_one :wiki, :dependent => :destroy
39 # Custom field for the project issues
39 # Custom field for the project issues
40 has_and_belongs_to_many :issue_custom_fields,
40 has_and_belongs_to_many :issue_custom_fields,
41 :class_name => 'IssueCustomField',
41 :class_name => 'IssueCustomField',
42 :order => "#{CustomField.table_name}.position",
42 :order => "#{CustomField.table_name}.position",
43 :join_table => "#{table_name_prefix}custom_fields_projects#{table_name_suffix}",
43 :join_table => "#{table_name_prefix}custom_fields_projects#{table_name_suffix}",
44 :association_foreign_key => 'custom_field_id'
44 :association_foreign_key => 'custom_field_id'
45
45
46 acts_as_tree :order => "name", :counter_cache => true
46 acts_as_tree :order => "name", :counter_cache => true
47
47
48 acts_as_customizable
48 acts_as_customizable
49 acts_as_searchable :columns => ['name', 'description'], :project_key => 'id', :permission => nil
49 acts_as_searchable :columns => ['name', 'description'], :project_key => 'id', :permission => nil
50 acts_as_event :title => Proc.new {|o| "#{l(:label_project)}: #{o.name}"},
50 acts_as_event :title => Proc.new {|o| "#{l(:label_project)}: #{o.name}"},
51 :url => Proc.new {|o| {:controller => 'projects', :action => 'show', :id => o.id}},
51 :url => Proc.new {|o| {:controller => 'projects', :action => 'show', :id => o.id}},
52 :author => nil
52 :author => nil
53
53
54 attr_protected :status, :enabled_module_names
54 attr_protected :status, :enabled_module_names
55
55
56 validates_presence_of :name, :identifier
56 validates_presence_of :name, :identifier
57 validates_uniqueness_of :name, :identifier
57 validates_uniqueness_of :name, :identifier
58 validates_associated :repository, :wiki
58 validates_associated :repository, :wiki
59 validates_length_of :name, :maximum => 30
59 validates_length_of :name, :maximum => 30
60 validates_length_of :homepage, :maximum => 255
60 validates_length_of :homepage, :maximum => 255
61 validates_length_of :identifier, :in => 3..20
61 validates_length_of :identifier, :in => 3..20
62 validates_format_of :identifier, :with => /^[a-z0-9\-]*$/
62 validates_format_of :identifier, :with => /^[a-z0-9\-]*$/
63
63
64 before_destroy :delete_all_members
64 before_destroy :delete_all_members
65
65
66 named_scope :repository_enabled, { :include => :enabled_modules, :conditions => ["#{EnabledModule.table_name}.name=?", 'repository'] }
66 named_scope :has_module, lambda { |mod| { :conditions => ["#{Project.table_name}.id IN (SELECT em.project_id FROM #{EnabledModule.table_name} em WHERE em.name=?)", mod.to_s] } }
67
67
68 def identifier=(identifier)
68 def identifier=(identifier)
69 super unless identifier_frozen?
69 super unless identifier_frozen?
70 end
70 end
71
71
72 def identifier_frozen?
72 def identifier_frozen?
73 errors[:identifier].nil? && !(new_record? || identifier.blank?)
73 errors[:identifier].nil? && !(new_record? || identifier.blank?)
74 end
74 end
75
75
76 def issues_with_subprojects(include_subprojects=false)
76 def issues_with_subprojects(include_subprojects=false)
77 conditions = nil
77 conditions = nil
78 if include_subprojects
78 if include_subprojects
79 ids = [id] + child_ids
79 ids = [id] + child_ids
80 conditions = ["#{Project.table_name}.id IN (#{ids.join(',')}) AND #{Project.visible_by}"]
80 conditions = ["#{Project.table_name}.id IN (#{ids.join(',')}) AND #{Project.visible_by}"]
81 end
81 end
82 conditions ||= ["#{Project.table_name}.id = ?", id]
82 conditions ||= ["#{Project.table_name}.id = ?", id]
83 # Quick and dirty fix for Rails 2 compatibility
83 # Quick and dirty fix for Rails 2 compatibility
84 Issue.send(:with_scope, :find => { :conditions => conditions }) do
84 Issue.send(:with_scope, :find => { :conditions => conditions }) do
85 Version.send(:with_scope, :find => { :conditions => conditions }) do
85 Version.send(:with_scope, :find => { :conditions => conditions }) do
86 yield
86 yield
87 end
87 end
88 end
88 end
89 end
89 end
90
90
91 # returns latest created projects
91 # returns latest created projects
92 # non public projects will be returned only if user is a member of those
92 # non public projects will be returned only if user is a member of those
93 def self.latest(user=nil, count=5)
93 def self.latest(user=nil, count=5)
94 find(:all, :limit => count, :conditions => visible_by(user), :order => "created_on DESC")
94 find(:all, :limit => count, :conditions => visible_by(user), :order => "created_on DESC")
95 end
95 end
96
96
97 def self.visible_by(user=nil)
97 def self.visible_by(user=nil)
98 user ||= User.current
98 user ||= User.current
99 if user && user.admin?
99 if user && user.admin?
100 return "#{Project.table_name}.status=#{Project::STATUS_ACTIVE}"
100 return "#{Project.table_name}.status=#{Project::STATUS_ACTIVE}"
101 elsif user && user.memberships.any?
101 elsif user && user.memberships.any?
102 return "#{Project.table_name}.status=#{Project::STATUS_ACTIVE} AND (#{Project.table_name}.is_public = #{connection.quoted_true} or #{Project.table_name}.id IN (#{user.memberships.collect{|m| m.project_id}.join(',')}))"
102 return "#{Project.table_name}.status=#{Project::STATUS_ACTIVE} AND (#{Project.table_name}.is_public = #{connection.quoted_true} or #{Project.table_name}.id IN (#{user.memberships.collect{|m| m.project_id}.join(',')}))"
103 else
103 else
104 return "#{Project.table_name}.status=#{Project::STATUS_ACTIVE} AND #{Project.table_name}.is_public = #{connection.quoted_true}"
104 return "#{Project.table_name}.status=#{Project::STATUS_ACTIVE} AND #{Project.table_name}.is_public = #{connection.quoted_true}"
105 end
105 end
106 end
106 end
107
107
108 def self.allowed_to_condition(user, permission, options={})
108 def self.allowed_to_condition(user, permission, options={})
109 statements = []
109 statements = []
110 base_statement = "#{Project.table_name}.status=#{Project::STATUS_ACTIVE}"
110 base_statement = "#{Project.table_name}.status=#{Project::STATUS_ACTIVE}"
111 if options[:project]
111 if options[:project]
112 project_statement = "#{Project.table_name}.id = #{options[:project].id}"
112 project_statement = "#{Project.table_name}.id = #{options[:project].id}"
113 project_statement << " OR #{Project.table_name}.parent_id = #{options[:project].id}" if options[:with_subprojects]
113 project_statement << " OR #{Project.table_name}.parent_id = #{options[:project].id}" if options[:with_subprojects]
114 base_statement = "(#{project_statement}) AND (#{base_statement})"
114 base_statement = "(#{project_statement}) AND (#{base_statement})"
115 end
115 end
116 if user.admin?
116 if user.admin?
117 # no restriction
117 # no restriction
118 else
118 else
119 statements << "1=0"
119 statements << "1=0"
120 if user.logged?
120 if user.logged?
121 statements << "#{Project.table_name}.is_public = #{connection.quoted_true}" if Role.non_member.allowed_to?(permission)
121 statements << "#{Project.table_name}.is_public = #{connection.quoted_true}" if Role.non_member.allowed_to?(permission)
122 allowed_project_ids = user.memberships.select {|m| m.role.allowed_to?(permission)}.collect {|m| m.project_id}
122 allowed_project_ids = user.memberships.select {|m| m.role.allowed_to?(permission)}.collect {|m| m.project_id}
123 statements << "#{Project.table_name}.id IN (#{allowed_project_ids.join(',')})" if allowed_project_ids.any?
123 statements << "#{Project.table_name}.id IN (#{allowed_project_ids.join(',')})" if allowed_project_ids.any?
124 elsif Role.anonymous.allowed_to?(permission)
124 elsif Role.anonymous.allowed_to?(permission)
125 # anonymous user allowed on public project
125 # anonymous user allowed on public project
126 statements << "#{Project.table_name}.is_public = #{connection.quoted_true}"
126 statements << "#{Project.table_name}.is_public = #{connection.quoted_true}"
127 else
127 else
128 # anonymous user is not authorized
128 # anonymous user is not authorized
129 end
129 end
130 end
130 end
131 statements.empty? ? base_statement : "((#{base_statement}) AND (#{statements.join(' OR ')}))"
131 statements.empty? ? base_statement : "((#{base_statement}) AND (#{statements.join(' OR ')}))"
132 end
132 end
133
133
134 def project_condition(with_subprojects)
134 def project_condition(with_subprojects)
135 cond = "#{Project.table_name}.id = #{id}"
135 cond = "#{Project.table_name}.id = #{id}"
136 cond = "(#{cond} OR #{Project.table_name}.parent_id = #{id})" if with_subprojects
136 cond = "(#{cond} OR #{Project.table_name}.parent_id = #{id})" if with_subprojects
137 cond
137 cond
138 end
138 end
139
139
140 def self.find(*args)
140 def self.find(*args)
141 if args.first && args.first.is_a?(String) && !args.first.match(/^\d*$/)
141 if args.first && args.first.is_a?(String) && !args.first.match(/^\d*$/)
142 project = find_by_identifier(*args)
142 project = find_by_identifier(*args)
143 raise ActiveRecord::RecordNotFound, "Couldn't find Project with identifier=#{args.first}" if project.nil?
143 raise ActiveRecord::RecordNotFound, "Couldn't find Project with identifier=#{args.first}" if project.nil?
144 project
144 project
145 else
145 else
146 super
146 super
147 end
147 end
148 end
148 end
149
149
150 def to_param
150 def to_param
151 # id is used for projects with a numeric identifier (compatibility)
151 # id is used for projects with a numeric identifier (compatibility)
152 @to_param ||= (identifier.to_s =~ %r{^\d*$} ? id : identifier)
152 @to_param ||= (identifier.to_s =~ %r{^\d*$} ? id : identifier)
153 end
153 end
154
154
155 def active?
155 def active?
156 self.status == STATUS_ACTIVE
156 self.status == STATUS_ACTIVE
157 end
157 end
158
158
159 def archive
159 def archive
160 # Archive subprojects if any
160 # Archive subprojects if any
161 children.each do |subproject|
161 children.each do |subproject|
162 subproject.archive
162 subproject.archive
163 end
163 end
164 update_attribute :status, STATUS_ARCHIVED
164 update_attribute :status, STATUS_ARCHIVED
165 end
165 end
166
166
167 def unarchive
167 def unarchive
168 return false if parent && !parent.active?
168 return false if parent && !parent.active?
169 update_attribute :status, STATUS_ACTIVE
169 update_attribute :status, STATUS_ACTIVE
170 end
170 end
171
171
172 def active_children
172 def active_children
173 children.select {|child| child.active?}
173 children.select {|child| child.active?}
174 end
174 end
175
175
176 # Returns an array of the trackers used by the project and its sub projects
176 # Returns an array of the trackers used by the project and its sub projects
177 def rolled_up_trackers
177 def rolled_up_trackers
178 @rolled_up_trackers ||=
178 @rolled_up_trackers ||=
179 Tracker.find(:all, :include => :projects,
179 Tracker.find(:all, :include => :projects,
180 :select => "DISTINCT #{Tracker.table_name}.*",
180 :select => "DISTINCT #{Tracker.table_name}.*",
181 :conditions => ["#{Project.table_name}.id = ? OR #{Project.table_name}.parent_id = ?", id, id],
181 :conditions => ["#{Project.table_name}.id = ? OR #{Project.table_name}.parent_id = ?", id, id],
182 :order => "#{Tracker.table_name}.position")
182 :order => "#{Tracker.table_name}.position")
183 end
183 end
184
184
185 # Deletes all project's members
185 # Deletes all project's members
186 def delete_all_members
186 def delete_all_members
187 Member.delete_all(['project_id = ?', id])
187 Member.delete_all(['project_id = ?', id])
188 end
188 end
189
189
190 # Users issues can be assigned to
190 # Users issues can be assigned to
191 def assignable_users
191 def assignable_users
192 members.select {|m| m.role.assignable?}.collect {|m| m.user}.sort
192 members.select {|m| m.role.assignable?}.collect {|m| m.user}.sort
193 end
193 end
194
194
195 # Returns the mail adresses of users that should be always notified on project events
195 # Returns the mail adresses of users that should be always notified on project events
196 def recipients
196 def recipients
197 members.select {|m| m.mail_notification? || m.user.mail_notification?}.collect {|m| m.user.mail}
197 members.select {|m| m.mail_notification? || m.user.mail_notification?}.collect {|m| m.user.mail}
198 end
198 end
199
199
200 # Returns an array of all custom fields enabled for project issues
200 # Returns an array of all custom fields enabled for project issues
201 # (explictly associated custom fields and custom fields enabled for all projects)
201 # (explictly associated custom fields and custom fields enabled for all projects)
202 def all_issue_custom_fields
202 def all_issue_custom_fields
203 @all_issue_custom_fields ||= (IssueCustomField.for_all + issue_custom_fields).uniq.sort
203 @all_issue_custom_fields ||= (IssueCustomField.for_all + issue_custom_fields).uniq.sort
204 end
204 end
205
205
206 def project
206 def project
207 self
207 self
208 end
208 end
209
209
210 def <=>(project)
210 def <=>(project)
211 name.downcase <=> project.name.downcase
211 name.downcase <=> project.name.downcase
212 end
212 end
213
213
214 def to_s
214 def to_s
215 name
215 name
216 end
216 end
217
217
218 # Returns a short description of the projects (first lines)
218 # Returns a short description of the projects (first lines)
219 def short_description(length = 255)
219 def short_description(length = 255)
220 description.gsub(/^(.{#{length}}[^\n]*).*$/m, '\1').strip if description
220 description.gsub(/^(.{#{length}}[^\n]*).*$/m, '\1').strip if description
221 end
221 end
222
222
223 def allows_to?(action)
223 def allows_to?(action)
224 if action.is_a? Hash
224 if action.is_a? Hash
225 allowed_actions.include? "#{action[:controller]}/#{action[:action]}"
225 allowed_actions.include? "#{action[:controller]}/#{action[:action]}"
226 else
226 else
227 allowed_permissions.include? action
227 allowed_permissions.include? action
228 end
228 end
229 end
229 end
230
230
231 def module_enabled?(module_name)
231 def module_enabled?(module_name)
232 module_name = module_name.to_s
232 module_name = module_name.to_s
233 enabled_modules.detect {|m| m.name == module_name}
233 enabled_modules.detect {|m| m.name == module_name}
234 end
234 end
235
235
236 def enabled_module_names=(module_names)
236 def enabled_module_names=(module_names)
237 enabled_modules.clear
237 enabled_modules.clear
238 module_names = [] unless module_names && module_names.is_a?(Array)
238 module_names = [] unless module_names && module_names.is_a?(Array)
239 module_names.each do |name|
239 module_names.each do |name|
240 enabled_modules << EnabledModule.new(:name => name.to_s)
240 enabled_modules << EnabledModule.new(:name => name.to_s)
241 end
241 end
242 end
242 end
243
243
244 # Returns an auto-generated project identifier based on the last identifier used
244 # Returns an auto-generated project identifier based on the last identifier used
245 def self.next_identifier
245 def self.next_identifier
246 p = Project.find(:first, :order => 'created_on DESC')
246 p = Project.find(:first, :order => 'created_on DESC')
247 p.nil? ? nil : p.identifier.to_s.succ
247 p.nil? ? nil : p.identifier.to_s.succ
248 end
248 end
249
249
250 protected
250 protected
251 def validate
251 def validate
252 errors.add(parent_id, " must be a root project") if parent and parent.parent
252 errors.add(parent_id, " must be a root project") if parent and parent.parent
253 errors.add_to_base("A project with subprojects can't be a subproject") if parent and children.size > 0
253 errors.add_to_base("A project with subprojects can't be a subproject") if parent and children.size > 0
254 errors.add(:identifier, :activerecord_error_invalid) if !identifier.blank? && identifier.match(/^\d*$/)
254 errors.add(:identifier, :activerecord_error_invalid) if !identifier.blank? && identifier.match(/^\d*$/)
255 end
255 end
256
256
257 private
257 private
258 def allowed_permissions
258 def allowed_permissions
259 @allowed_permissions ||= begin
259 @allowed_permissions ||= begin
260 module_names = enabled_modules.collect {|m| m.name}
260 module_names = enabled_modules.collect {|m| m.name}
261 Redmine::AccessControl.modules_permissions(module_names).collect {|p| p.name}
261 Redmine::AccessControl.modules_permissions(module_names).collect {|p| p.name}
262 end
262 end
263 end
263 end
264
264
265 def allowed_actions
265 def allowed_actions
266 @actions_allowed ||= allowed_permissions.inject([]) { |actions, permission| actions += Redmine::AccessControl.allowed_actions(permission) }.flatten
266 @actions_allowed ||= allowed_permissions.inject([]) { |actions, permission| actions += Redmine::AccessControl.allowed_actions(permission) }.flatten
267 end
267 end
268 end
268 end
General Comments 0
You need to be logged in to leave comments. Login now