sudosu / rails_admin_pundit

Rails Admin integration with Pundit authorization system
MIT License
37 stars 28 forks source link

rails_admin policies need to be added to all policy classes #13

Open alexmc6 opened 7 years ago

alexmc6 commented 7 years ago

(Support Request) I have added the rails_admin? method to the app/policies/application_policy.rb as per the readme but the code seems to want me to add the same/similar method to all other policies I have - eg the ones for different models. It does not see that the application_policy.rb acts as a fall back.

Is this correct behaviour or have I done something wrong?

remote: -----> Ruby app detected remote: -----> Compiling Ruby/Rails remote: -----> Using Ruby version: ruby-2.3.1 remote: Using rake 12.0.0 remote: Using concurrent-ruby 1.0.4 remote: Using i18n 0.7.0 remote: Using minitest 5.10.1 remote: Using thread_safe 0.3.5 remote: Using builder 3.2.3 remote: Using erubis 2.7.0 remote: Using mini_portile2 2.1.0 remote: Using rack 2.0.1 remote: Using nio4r 1.2.1 remote: Using websocket-extensions 0.1.2 remote: Using mime-types-data 3.2016.0521 remote: Using arel 7.1.4 remote: Using acts_as_votable 0.10.0 remote: Using public_suffix 2.0.5 remote: Using execjs 2.7.0 remote: Using bcrypt 3.1.11 remote: Using sass 3.4.23 remote: Using coffee-script-source 1.12.2 remote: Using method_source 0.8.2 remote: Using thor 0.19.1 remote: Using orm_adapter 0.5.0 remote: Using multipart-post 2.0.0 remote: Using tilt 2.0.5 remote: Using hashie 3.4.6 remote: Using high_voltage 3.0.0 remote: Using multi_json 1.12.1 remote: Using turbolinks-source 5.0.0 remote: Using jwt 1.5.6 remote: Using bundler 1.13.7 remote: Using pr_geohash 1.0.0 remote: Using multi_xml 0.6.0 remote: Using nested_form 0.3.2 remote: Using pg 0.20.0 remote: Using puma 3.6.2 remote: Using remotipart 1.3.1 remote: Using ratyrate 1.2.2.alpha remote: Using tzinfo 1.2.2 remote: Using rsolr 1.1.2 remote: Using nokogiri 1.7.0.1 remote: Using mime-types 3.1 remote: Using rack-test 0.6.3 remote: Using warden 1.2.6 remote: Using sprockets 3.7.1 remote: Using websocket-driver 0.6.4 remote: Using addressable 2.5.0 remote: Using autoprefixer-rails 6.6.1 remote: Using uglifier 3.0.4 remote: Using coffee-script 2.4.1 remote: Using faraday 0.10.1 remote: Using omniauth 1.3.2 remote: Using turbolinks 5.0.1 remote: Using haml 4.0.7 remote: Using activesupport 5.0.1 remote: Using sunspot 2.2.7 remote: Using loofah 2.0.3 remote: Using rack-pjax 1.0.0 remote: Using mail 2.6.4 remote: Using bootstrap-sass 3.3.7 remote: Using koala 2.4.0 remote: Using oauth2 1.3.0 remote: Using rails-dom-testing 2.0.2 remote: Using globalid 0.3.7 remote: Using activemodel 5.0.1 remote: Using jbuilder 2.6.1 remote: Using pundit 1.1.0 remote: Using rails-html-sanitizer 1.0.3 remote: Using omniauth-oauth2 1.4.0 remote: Using activejob 5.0.1 remote: Using activerecord 5.0.1 remote: Using carrierwave 1.0.0 remote: Using omniauth-facebook 4.0.0 remote: Using actionview 5.0.1 remote: Using actionpack 5.0.1 remote: Using actionmailer 5.0.1 remote: Using railties 5.0.1 remote: Using kaminari 0.17.0 remote: Using actioncable 5.0.1 remote: Using sprockets-rails 3.2.0 remote: Using simple_form 3.4.0 remote: Using coffee-rails 4.2.1 remote: Using d3-rails 4.7.0 remote: Using responders 2.3.0 remote: Using font-awesome-rails 4.7.0.1 remote: Using jquery-rails 4.2.2 remote: Using jquery-turbolinks 2.1.0 remote: Using jquery-ui-rails 5.0.5 remote: Using sass-rails 5.0.6 remote: Using rails 5.0.1 remote: Using devise 4.2.0 remote: Using mailboxer 0.14.0 from git://github.com/ging/mailboxer.git (at master@0e41d6a) remote: Using sunspot_rails 2.2.7 remote: Using rails_admin 1.1.1 remote: Using messaging 0.0.1 from git://github.com/erm213/rails-messaging.git (at master@d4a5db8) remote: Using rails_admin_pundit 0.0.1 from git://github.com/sudosu/rails_admin_pundit.git (at master@2b793c1)