mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 11:07:11 +02:00
Default query should not be applied if the query is not allowed to be set as the default (#37499).
Patch by Mizuki ISHIKAWA. git-svn-id: https://svn.redmine.org/redmine/trunk@21748 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -87,6 +87,7 @@ class ProjectQueryTest < ActiveSupport::TestCase
|
||||
user = User.find(1)
|
||||
query = ProjectQuery.find(11)
|
||||
user_query = ProjectQuery.find(12)
|
||||
user_query.update(visibility: Query::VISIBILITY_PUBLIC)
|
||||
|
||||
[nil, user, User.anonymous].each do |u|
|
||||
assert_nil IssueQuery.default(user: u)
|
||||
|
||||
@@ -2814,6 +2814,7 @@ class QueryTest < ActiveSupport::TestCase
|
||||
project_query = IssueQuery.find(1)
|
||||
query = IssueQuery.find(4)
|
||||
user_query = IssueQuery.find(3)
|
||||
user_query.update(visibility: Query::VISIBILITY_PUBLIC)
|
||||
user_query.update_column :user_id, user.id
|
||||
|
||||
[nil, user, User.anonymous].each do |u|
|
||||
|
||||
Reference in New Issue
Block a user