From 219f8764014b99755cf15be238ab503868e320c1 Mon Sep 17 00:00:00 2001 From: Toru Takahashi Date: Tue, 22 May 2018 03:34:23 +0900 Subject: [PATCH] [phase-8]add authorize in controller --- app/controllers/glossary_categories_controller.rb | 1 + app/controllers/glossary_terms_controller.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/controllers/glossary_categories_controller.rb b/app/controllers/glossary_categories_controller.rb index f40f77b..d4753dc 100644 --- a/app/controllers/glossary_categories_controller.rb +++ b/app/controllers/glossary_categories_controller.rb @@ -1,5 +1,6 @@ class GlossaryCategoriesController < ApplicationController + before_action :authorize before_action :find_category_from_id, only: [:show, :edit, :update, :destroy] before_action :find_project_from_id diff --git a/app/controllers/glossary_terms_controller.rb b/app/controllers/glossary_terms_controller.rb index 45f00c1..fe34678 100644 --- a/app/controllers/glossary_terms_controller.rb +++ b/app/controllers/glossary_terms_controller.rb @@ -1,5 +1,6 @@ class GlossaryTermsController < ApplicationController + before_action :authorize before_action :find_term_from_id, only: [:show, :edit, :update, :destroy] before_action :find_project_from_id