Skip to content

Commit

Permalink
fix project bug
Browse files Browse the repository at this point in the history
  • Loading branch information
arBmind committed Jun 28, 2021
1 parent d8fc38e commit 2d664d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/controllers/hourglass_completion_controller.rb
Expand Up @@ -15,7 +15,8 @@ def issues
end
was_admin = User.current.admin?
User.current.admin = false # prevent Redmine from ignoring permissions for admins, like we do later anyways
issues = Issue.cross_project_scope(params[:project_id]).visible
project = params[:project_id].present? ? Project.find(params[:project_id]) : nil
issues = Issue.cross_project_scope(project).visible
issues = issues.joins(:project).where(Project.allowed_to_one_of_condition User.current, Hourglass::AccessControl.permissions_from_action(controller: 'hourglass/time_logs', action: 'book')).where(
issue_arel[:id].eq(params[:term].to_i)
.or(id_as_text.matches("%#{params[:term]}%"))
Expand Down
2 changes: 1 addition & 1 deletion lib/hourglass.rb
Expand Up @@ -3,7 +3,7 @@ module Hourglass
PLUGIN_NAME = "redmine_#{NAMESPACE}".to_sym
PLUGIN_ROOT = Pathname.new(File.join File.dirname(__FILE__), '..').cleanpath

VERSION = '1.2.0-beta1'
VERSION = '1.2.0-beta2'

def self.redmine_has_advanced_queries?
Redmine::VERSION::MAJOR > 3 || (Redmine::VERSION::MAJOR == 3 && Redmine::VERSION::MINOR >= 4)
Expand Down

0 comments on commit 2d664d5

Please sign in to comment.