From 14ac3ef52434599b9eba6cdc1944c59ae26b9f85 Mon Sep 17 00:00:00 2001 From: Mike Simkins Date: Thu, 2 Sep 2010 15:28:16 +0100 Subject: [PATCH] Remove CanCan in preparation for D-A --- Gemfile | 1 - Gemfile.lock | 2 -- README.markdown | 7 ++++++- app/models/ability.rb | 14 -------------- 4 files changed, 6 insertions(+), 18 deletions(-) delete mode 100644 app/models/ability.rb diff --git a/Gemfile b/Gemfile index 38b366c..2bb87dc 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,6 @@ gem 'mysql2' gem "devise", "~> 1.1.2" gem "devise_invitable", :git => "git://github.com/rymai/devise_invitable.git" gem 'capistrano' -gem 'cancan' gem 'formtastic', :git => "http://github.com/justinfrench/formtastic.git", :branch => "rails3" # Use unicorn as the web server diff --git a/Gemfile.lock b/Gemfile.lock index 05cd3d0..bac2a65 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,7 +85,6 @@ GEM activesupport (~> 3.0.0) bcrypt-ruby (2.1.2) builder (2.1.2) - cancan (1.3.4) capistrano (2.5.19) highline net-scp (>= 1.0.0) @@ -180,7 +179,6 @@ PLATFORMS ruby DEPENDENCIES - cancan capistrano capybara cucumber diff --git a/README.markdown b/README.markdown index 1cde1e0..5da36fb 100644 --- a/README.markdown +++ b/README.markdown @@ -7,7 +7,7 @@ Gems Used ========= * Devise (1.1.2) for Authentication -* CanCan for Authorization +* Declarative_Authorization for Authorization CSS Frameworks @@ -40,3 +40,8 @@ That means that each commit should contain the smallest possible logical change. Don’t commit two features at once, don’t update the gemspec at the same time you add a feature, don’t fix a whole bunch of whitespace in a file at the same time you change a few lines, etc, etc. + +Maintainers & Contributors +========================== + +This project is maintained by Mike Simkins, Contributions are welcome, and you will be mentioned here diff --git a/app/models/ability.rb b/app/models/ability.rb deleted file mode 100644 index e4eb0c8..0000000 --- a/app/models/ability.rb +++ /dev/null @@ -1,14 +0,0 @@ -class Ability - include CanCan::Ability - - def initialise(user) - user ||= User.new #Guest User if not already Set up - if user.role? :super_admin - can :manage, :all - elsif user.role? :location_admin - can :manage, [Location] - else - can :read, :all - end - end -end -- 2.11.4.GIT