diff options
| author | Vlatka Pavisic | 2017-02-06 11:42:12 +0100 | 
|---|---|---|
| committer | Vlatka Pavisic | 2017-02-07 11:25:29 +0100 | 
| commit | d94b1271d147fdb5bbd1e616e116173198e858db (patch) | |
| tree | e1b5631e72e009ffd80fdf4e47159b2b11cd899e /app/controllers/calendars_controller.rb | |
| parent | 9c3095c20aaef122212ed71ce8818e3a18b13308 (diff) | |
| download | chouette-core-d94b1271d147fdb5bbd1e616e116173198e858db.tar.bz2 | |
Refs #2476 : Disable modification and deletion of resources from another referential; in progress
Diffstat (limited to 'app/controllers/calendars_controller.rb')
| -rw-r--r-- | app/controllers/calendars_controller.rb | 6 | 
1 files changed, 1 insertions, 5 deletions
| diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb index 9784820f9..3e7a05231 100644 --- a/app/controllers/calendars_controller.rb +++ b/app/controllers/calendars_controller.rb @@ -1,6 +1,6 @@  class CalendarsController < BreadcrumbController +  include PolicyChecker    defaults resource_class: Calendar -  before_action :check_policy, only: [:edit, :update, :destroy]    respond_to :html    respond_to :js, only: :index @@ -39,9 +39,5 @@ class CalendarsController < BreadcrumbController      calendars = calendars.order(sort_column + ' ' + sort_direction) if sort_column && sort_direction      @calendars = calendars.paginate(page: params[:page])    end - -  def check_policy -    authorize resource -  end  end | 
