diff --git a/Gemfile b/Gemfile index d3ddb92..4949c3f 100644 --- a/Gemfile +++ b/Gemfile @@ -68,3 +68,6 @@ gem 'paperclip' # Use devise for Admins gem 'devise' + +# Use cancan for authorization +gem 'cancan' diff --git a/Gemfile.lock b/Gemfile.lock index 349ab97..a0729a7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -41,6 +41,7 @@ GEM columnize (~> 0.8) debugger-linecache (~> 1.2) slop (~> 3.6) + cancan (1.6.10) capistrano (3.2.1) i18n rake (>= 10.0.0) @@ -172,6 +173,7 @@ DEPENDENCIES bootstrap-sass (= 3.2.0.0) bootstrap-will_paginate (= 0.0.10) byebug + cancan capistrano (~> 3.1) capistrano-rails (~> 1.1) capistrano-rvm diff --git a/app/controllers/orders_controller.rb b/app/controllers/orders_controller.rb index e774a1d..3b998b5 100644 --- a/app/controllers/orders_controller.rb +++ b/app/controllers/orders_controller.rb @@ -1,5 +1,6 @@ class OrdersController < ApplicationController def overview + puts current_user @users = User.all end