Project

General

Profile

Patch #43214 ยป improve-allowed_to_condition.patch

Go MAEDA, 2025-09-16 11:55

View differences:

app/models/project.rb
186 186
    perm = Redmine::AccessControl.permission(permission)
187 187
    base_statement =
188 188
      if perm && perm.read?
189
        "#{Project.table_name}.status <> #{Project::STATUS_ARCHIVED} AND #{Project.table_name}.status <> #{Project::STATUS_SCHEDULED_FOR_DELETION}"
189
        "#{Project.table_name}.status IN (#{Project::STATUS_ACTIVE}, #{Project::STATUS_CLOSED})"
190 190
      else
191 191
        "#{Project.table_name}.status = #{Project::STATUS_ACTIVE}"
192 192
      end
    (1-1/1)