parent
2ee5a63ead
commit
a119240216
3 changed files with 8 additions and 0 deletions
|
@ -3,9 +3,12 @@ class IssueCommentsController < ApplicationController
|
||||||
|
|
||||||
before_action :authorize_web
|
before_action :authorize_web
|
||||||
before_action :set_locale
|
before_action :set_locale
|
||||||
|
before_action :check_database_readable
|
||||||
|
|
||||||
authorize_resource
|
authorize_resource
|
||||||
|
|
||||||
|
before_action :check_database_writable, :only => [:create]
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@issue = Issue.find(params[:issue_id])
|
@issue = Issue.find(params[:issue_id])
|
||||||
comment = @issue.comments.build(issue_comment_params)
|
comment = @issue.comments.build(issue_comment_params)
|
||||||
|
|
|
@ -3,10 +3,12 @@ class IssuesController < ApplicationController
|
||||||
|
|
||||||
before_action :authorize_web
|
before_action :authorize_web
|
||||||
before_action :set_locale
|
before_action :set_locale
|
||||||
|
before_action :check_database_readable
|
||||||
|
|
||||||
authorize_resource
|
authorize_resource
|
||||||
|
|
||||||
before_action :find_issue, :only => [:show, :resolve, :reopen, :ignore]
|
before_action :find_issue, :only => [:show, :resolve, :reopen, :ignore]
|
||||||
|
before_action :check_database_writable, :only => [:resolve, :ignore, :reopen]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@title = t ".title"
|
@title = t ".title"
|
||||||
|
|
|
@ -3,9 +3,12 @@ class ReportsController < ApplicationController
|
||||||
|
|
||||||
before_action :authorize_web
|
before_action :authorize_web
|
||||||
before_action :set_locale
|
before_action :set_locale
|
||||||
|
before_action :check_database_readable
|
||||||
|
|
||||||
authorize_resource
|
authorize_resource
|
||||||
|
|
||||||
|
before_action :check_database_writable, :only => [:new, :create]
|
||||||
|
|
||||||
def new
|
def new
|
||||||
if required_new_report_params_present?
|
if required_new_report_params_present?
|
||||||
@report = Report.new
|
@report = Report.new
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue