Merge branch 'assets-refactoring' into dev
Conflicts: app/controllers/issues_controller.rb app/views/issues/index.html.haml
This commit is contained in:
commit
f1e6d9be90
116 changed files with 1431 additions and 1455 deletions
|
@ -1,12 +1,12 @@
|
|||
class IssuesController < ApplicationController
|
||||
before_filter :authenticate_user!
|
||||
before_filter :project
|
||||
before_filter :project
|
||||
before_filter :issue, :only => [:edit, :update, :destroy, :show]
|
||||
|
||||
# Authorize
|
||||
before_filter :add_project_abilities
|
||||
before_filter :authorize_read_issue!
|
||||
before_filter :authorize_write_issue!, :only => [:new, :create, :close, :edit, :update, :sort]
|
||||
before_filter :authorize_write_issue!, :only => [:new, :create, :close, :edit, :update, :sort]
|
||||
|
||||
respond_to :js
|
||||
|
||||
|
@ -57,14 +57,13 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
def destroy
|
||||
return access_denied! unless can?(current_user, :admin_issue, @issue)
|
||||
|
||||
@issue.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.js { render :nothing => true }
|
||||
format.js { render :nothing => true }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -94,7 +93,7 @@ class IssuesController < ApplicationController
|
|||
render :partial => 'issues'
|
||||
end
|
||||
|
||||
protected
|
||||
protected
|
||||
|
||||
def issue
|
||||
@issue ||= @project.issues.find(params[:id])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue