diff options
| author | Vlatka Pavisic | 2017-01-23 14:48:46 +0100 | 
|---|---|---|
| committer | Vlatka Pavisic | 2017-01-23 14:48:46 +0100 | 
| commit | 39887727b818815f002d9fb6c28344e2b50ce209 (patch) | |
| tree | 35a318c9d4193f09db04c12ce8d6af581b6808c2 /app/controllers/time_tables_controller.rb | |
| parent | ed75c7827615d0ae58202212189dbfbbf4b92609 (diff) | |
| download | chouette-core-39887727b818815f002d9fb6c28344e2b50ce209.tar.bz2 | |
Refs #2428 #2427 : User permissions
Diffstat (limited to 'app/controllers/time_tables_controller.rb')
| -rw-r--r-- | app/controllers/time_tables_controller.rb | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb index 10e1e76dc..ec62dfb98 100644 --- a/app/controllers/time_tables_controller.rb +++ b/app/controllers/time_tables_controller.rb @@ -8,6 +8,8 @@ class TimeTablesController < ChouetteController    belongs_to :referential +  before_action :check_policy, only: [:edit, :update, :destroy] +    def show      @year = params[:year] ? params[:year].to_i : Date.today.cwyear      @time_table_combination = TimeTableCombination.new @@ -112,6 +114,10 @@ class TimeTablesController < ChouetteController      referential_time_tables_path(referential)    end +  def check_policy +    authorize resource +  end +    private    def time_table_params | 
