summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-12-21 02:27:51 +0000
committerGo MAEDA <maeda@farend.jp>2022-12-21 02:27:51 +0000
commitd9117ce136ab5fd0cd96e5463034dd64590b33de (patch)
tree80a38e06d1f7c31c8babbc3498f37a5f062b8474 /app
parentb40f83a399f8c88938b97872b8285b4107b83021 (diff)
downloadredmine-d9117ce136ab5fd0cd96e5463034dd64590b33de.tar.gz
redmine-d9117ce136ab5fd0cd96e5463034dd64590b33de.zip
Merged r21994 from trunk to 4.2-stable (#38064).
git-svn-id: https://svn.redmine.org/redmine/branches/4.2-stable@21996 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 2d2ff5748..5f58e9d41 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -842,7 +842,7 @@ class Project < ActiveRecord::Base
if user.admin?
true
else
- default_member_role.has_permission?(:select_project_modules)
+ default_member_role&.has_permission?(:select_project_modules)
end
else
user.allowed_to?(:select_project_modules, project)