Sha256: 7419270dc480db2e2a41052850bcc97257205fd96aada3b8b14912f92f319360

Contents?: true

Size: 564 Bytes

Versions: 5

Compression:

Stored size: 564 Bytes

Contents

module Dummy
  class User < Kadmin::Auth::User
    def authorized?(_request)
      return true
    end
  end

  class UserStore < Kadmin::Auth::UserStore
    def get(email)
      set(email, Dummy::User.new(email)) unless exists?(email)
      return @store[email.downcase]
    end
  end
end

Kadmin.config.logger = Rails.logger
Kadmin.config.mount_path = '/admin'

Kadmin::Auth.config.user_class = Dummy::User
Kadmin::Auth.config.user_store_class = Dummy::UserStore

Kadmin::Auth.config.enable!

Kadmin.config.navbar_links << { title: 'Test', path: '/admin/test' }

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kadmin-0.3.1 test/dummy/config/initializers/kadmin.rb
kadmin-0.3.0 test/dummy/config/initializers/kadmin.rb
kadmin-0.2.8 test/dummy/config/initializers/kadmin.rb
kadmin-0.2.7 test/dummy/config/initializers/kadmin.rb
kadmin-0.2.6 test/dummy/config/initializers/kadmin.rb