]> source.dussan.org Git - redmine.git/commitdiff
Merged r21994 from trunk to 4.2-stable (#38064).
authorGo MAEDA <maeda@farend.jp>
Wed, 21 Dec 2022 02:27:51 +0000 (02:27 +0000)
committerGo MAEDA <maeda@farend.jp>
Wed, 21 Dec 2022 02:27:51 +0000 (02:27 +0000)
git-svn-id: https://svn.redmine.org/redmine/branches/4.2-stable@21996 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/project.rb

index 2d2ff57481b678da758d14450d6c769107e9e492..5f58e9d4132e03ad8bab669e588e64fdd1d0c1f6 100644 (file)
@@ -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)