diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 200810c4b..2f7d6e600 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -114,22 +114,12 @@ class IssuesController < ApplicationController @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? } @allowed_statuses = @issue.new_statuses_allowed_to(User.current) - # @edit_allowed = User.current.allowed_to?(:edit_issues, @project) - if User.current.admin? || User.current.id == @issue.author_id || User.current.id == @issue.assigned_to_id || ProjectInfo.manager?(User.current.id, @project) - @edit_allowed = true - # elsif User.current.id == @issue.author.id - else - @edit_allowed = false - end - # @edit_allowed = User.current.allowed_to?(:edit_issues, @project) + @edit_allowed = User.current.allowed_to?(:edit_issues, @project) @priorities = IssuePriority.active @time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project) @project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'#by young - #by huang - # @change_flag = (@issue.author == User.current) || (User.current.admin?) - #end respond_to do |format| format.html { retrieve_previous_and_next_issue_ids diff --git a/app/views/issues/_edit.html.erb b/app/views/issues/_edit.html.erb index b93222436..4c379ae54 100644 --- a/app/views/issues/_edit.html.erb +++ b/app/views/issues/_edit.html.erb @@ -2,7 +2,7 @@ <%= error_messages_for 'issue', 'time_entry' %> <%= render :partial => 'conflict' if @conflict %>