Remove upmin-admin gem
This commit is contained in:
parent
99b16f05e2
commit
1f6fb1bad4
1
Gemfile
1
Gemfile
@ -19,7 +19,6 @@ gem 'pg'
|
||||
gem 'puma'
|
||||
gem 'pundit'
|
||||
gem 'simple_form'
|
||||
gem 'upmin-admin'
|
||||
gem 'dotenv-rails'
|
||||
gem 'react-rails'
|
||||
# gem 'react-rails-hot-loader'
|
||||
|
||||
30
Gemfile.lock
30
Gemfile.lock
@ -100,7 +100,6 @@ GEM
|
||||
rack-test (>= 0.6.3)
|
||||
regexp_parser (~> 1.5)
|
||||
xpath (~> 3.2)
|
||||
chartkick (3.2.1)
|
||||
childprocess (3.0.0)
|
||||
coderay (1.1.2)
|
||||
coffee-rails (5.0.0)
|
||||
@ -205,18 +204,6 @@ GEM
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
json (2.2.0)
|
||||
kaminari (1.1.1)
|
||||
activesupport (>= 4.1.0)
|
||||
kaminari-actionview (= 1.1.1)
|
||||
kaminari-activerecord (= 1.1.1)
|
||||
kaminari-core (= 1.1.1)
|
||||
kaminari-actionview (1.1.1)
|
||||
actionview
|
||||
kaminari-core (= 1.1.1)
|
||||
kaminari-activerecord (1.1.1)
|
||||
activerecord
|
||||
kaminari-core (= 1.1.1)
|
||||
kaminari-core (1.1.1)
|
||||
launchy (2.4.3)
|
||||
addressable (~> 2.3)
|
||||
listen (3.2.0)
|
||||
@ -253,8 +240,6 @@ GEM
|
||||
parser (2.6.5.0)
|
||||
ast (~> 2.4.0)
|
||||
pg (1.1.4)
|
||||
polyamorous (2.3.0)
|
||||
activerecord (>= 5.0)
|
||||
pry (0.12.2)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.9.0)
|
||||
@ -300,12 +285,6 @@ GEM
|
||||
thor (>= 0.19.0, < 2.0)
|
||||
rainbow (3.0.0)
|
||||
rake (13.0.0)
|
||||
ransack (2.3.0)
|
||||
actionpack (>= 5.0)
|
||||
activerecord (>= 5.0)
|
||||
activesupport (>= 5.0)
|
||||
i18n
|
||||
polyamorous (= 2.3.0)
|
||||
rb-fchange (0.0.6)
|
||||
ffi
|
||||
rb-fsevent (0.10.3)
|
||||
@ -403,14 +382,6 @@ GEM
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unicode-display_width (1.6.0)
|
||||
upmin-admin (0.1.3)
|
||||
chartkick
|
||||
haml (>= 3.0.0)
|
||||
jquery-rails
|
||||
kaminari
|
||||
rails
|
||||
ransack
|
||||
sass-rails
|
||||
warden (1.2.8)
|
||||
rack (>= 2.0.6)
|
||||
websocket-driver (0.7.1)
|
||||
@ -477,7 +448,6 @@ DEPENDENCIES
|
||||
sprockets (~> 3.7)
|
||||
turbolinks
|
||||
uglifier
|
||||
upmin-admin
|
||||
|
||||
RUBY VERSION
|
||||
ruby 2.6.0p0
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
# config/initializers/upmin.rb
|
||||
# Extends the Upmin ApplicationController to limit access to users with an admin role.
|
||||
# Depends on Devise for authentication plus role-based authorization.
|
||||
# Be sure to restart your server when you modify this file.
|
||||
module AdminOnly
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
before_action :authenticate_user!
|
||||
before_action :admin_only
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def admin_only
|
||||
unless current_user.admin?
|
||||
redirect_to :back, alert: 'Access denied.'
|
||||
end
|
||||
rescue ActionController::RedirectBackError
|
||||
redirect_to '/', alert: 'Access denied.'
|
||||
end
|
||||
end
|
||||
|
||||
Upmin::ApplicationController.send :include, AdminOnly
|
||||
@ -39,7 +39,6 @@ Rails.application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
mount Upmin::Engine => '/admin'
|
||||
root to: 'visitors#index'
|
||||
get '/play-now', to: 'tables#play_now', as: 'play_now'
|
||||
devise_for :users, controllers: { registrations: "users/registrations" }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user