From d9117ce136ab5fd0cd96e5463034dd64590b33de Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 21 Dec 2022 02:27:51 +0000 Subject: 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 --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3