diff --git a/Gemfile b/Gemfile index 12ac017..b9b5c5f 100644 --- a/Gemfile +++ b/Gemfile @@ -55,8 +55,6 @@ gem 'devise_invitable' gem 'omniauth' gem 'omniauth-shibboleth' -#rolify for roles -gem 'rolify' # Gems for repository integration gem 'email_validator' gem 'validate_url' @@ -68,9 +66,6 @@ # gem 'mysql2', '~> 0.3.18' -#cancan for usergroups -gem 'cancancan' - # # VIEWS # diff --git a/Gemfile.lock b/Gemfile.lock index 009f630..29d2181 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -78,7 +78,6 @@ thor (~> 0.19) builder (3.2.2) byebug (9.0.5) - cancancan (1.15.0) capybara (2.7.1) addressable mime-types (>= 1.16) @@ -268,7 +267,6 @@ ref (2.0.0) responders (2.2.0) railties (>= 4.2.0, < 5.1) - rolify (5.1.0) ruby-progressbar (1.8.1) rubyzip (1.2.0) sass (3.4.22) @@ -339,7 +337,6 @@ better_errors binding_of_caller byebug - cancancan caracal caracal-rails contact_us (>= 1.2.0) @@ -370,7 +367,6 @@ recaptcha redcarpet responders (~> 2.0) - rolify sass-rails swagger-docs therubyracer (>= 0.11.4) diff --git a/app/controllers/api/v0/statistics_controller.rb b/app/controllers/api/v0/statistics_controller.rb index 0709a06..ec21140 100644 --- a/app/controllers/api/v0/statistics_controller.rb +++ b/app/controllers/api/v0/statistics_controller.rb @@ -92,7 +92,7 @@ # takes in an array of active_reccords and restricts the range of dates # to those specified in the params # - # @params objects [Array] any active_reccord reccords which + # @param objects [Array] any active_reccord reccords which # have the "created_at" field specified # @return [Array] filtered list of objects def restrict_date_range( objects ) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index fa81497..698b136 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -9,9 +9,6 @@ # Override build_footer method in ActiveAdmin::Views::Pages require 'active_admin_views_pages_base.rb' - rescue_from CanCan::AccessDenied do |exception| - redirect_to root_url, :alert => exception.message - end rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized diff --git a/app/models/ability.rb b/app/models/ability.rb deleted file mode 100644 index e283051..0000000 --- a/app/models/ability.rb +++ /dev/null @@ -1,38 +0,0 @@ -class Ability - include GlobalHelpers - include CanCan::Ability - - def initialize(user) - # Define abilities for the passed in user here. For example: - # - user ||= User.new # guest user (not logged in) - if user.has_role? constant("user_role_types.super_admin") - can :manage, :all - else - can :read, :all - end - - can :manage_settings, User do |viewed_user| - viewed_user.present? && user.id == viewed_user.id - end - # - # The first argument to `can` is the action you are giving the user - # permission to do. - # If you pass :manage it will apply to every action. Other common actions - # here are :read, :create, :update and :destroy. - # - # The second argument is the resource the user can perform the action on. - # If you pass :all it will apply to every resource. Otherwise pass a Ruby - # class of the resource. - # - # The third argument is an optional hash of conditions to further filter the - # objects. - # For example, here the user can only update published articles. - # - # can :update, Article, :published => true - # - # See the wiki for details: - # https://github.com/ryanb/cancan/wiki/Defining-Abilities - - end -end