|
|
|
@ -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
|
|
|
|
|