From: Toshi MARUYAMA Date: Tue, 22 Oct 2019 15:53:37 +0000 (+0000) Subject: code cleanup: rubocop: fix Layout/AccessModifierIndentation in app/models/role.rb X-Git-Tag: 4.1.0~274 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e079d49dd702d17a8d3c11588aea0f17ab1b7ae8;p=redmine.git code cleanup: rubocop: fix Layout/AccessModifierIndentation in app/models/role.rb git-svn-id: http://svn.redmine.org/redmine/trunk@18829 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 874be5b39..90ce2e23a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -19,7 +19,6 @@ Bundler/OrderedGems: Layout/AccessModifierIndentation: Exclude: - 'app/controllers/wiki_controller.rb' - - 'app/models/role.rb' # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. diff --git a/app/models/role.rb b/app/models/role.rb index 7fee1b50f..0612af491 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -280,7 +280,7 @@ class Role < ActiveRecord::Base find_or_create_system_role(BUILTIN_ANONYMOUS, 'Anonymous') end -private + private def allowed_permissions @allowed_permissions ||= permissions + Redmine::AccessControl.public_permissions.collect {|p| p.name}