Remove upmin-admin gem
This commit is contained in:
parent
ac596c79e1
commit
71d86b9091
1
Gemfile
1
Gemfile
@ -19,7 +19,6 @@ gem 'pg'
|
|||||||
gem 'puma'
|
gem 'puma'
|
||||||
gem 'pundit'
|
gem 'pundit'
|
||||||
gem 'simple_form'
|
gem 'simple_form'
|
||||||
gem 'upmin-admin'
|
|
||||||
gem 'dotenv-rails'
|
gem 'dotenv-rails'
|
||||||
gem 'react-rails'
|
gem 'react-rails'
|
||||||
# gem 'react-rails-hot-loader'
|
# gem 'react-rails-hot-loader'
|
||||||
|
|||||||
30
Gemfile.lock
30
Gemfile.lock
@ -100,7 +100,6 @@ GEM
|
|||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
regexp_parser (~> 1.5)
|
regexp_parser (~> 1.5)
|
||||||
xpath (~> 3.2)
|
xpath (~> 3.2)
|
||||||
chartkick (3.2.1)
|
|
||||||
childprocess (3.0.0)
|
childprocess (3.0.0)
|
||||||
coderay (1.1.2)
|
coderay (1.1.2)
|
||||||
coffee-rails (5.0.0)
|
coffee-rails (5.0.0)
|
||||||
@ -205,18 +204,6 @@ GEM
|
|||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
json (2.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)
|
launchy (2.4.3)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.3)
|
||||||
listen (3.2.0)
|
listen (3.2.0)
|
||||||
@ -253,8 +240,6 @@ GEM
|
|||||||
parser (2.6.5.0)
|
parser (2.6.5.0)
|
||||||
ast (~> 2.4.0)
|
ast (~> 2.4.0)
|
||||||
pg (1.1.4)
|
pg (1.1.4)
|
||||||
polyamorous (2.3.0)
|
|
||||||
activerecord (>= 5.0)
|
|
||||||
pry (0.12.2)
|
pry (0.12.2)
|
||||||
coderay (~> 1.1.0)
|
coderay (~> 1.1.0)
|
||||||
method_source (~> 0.9.0)
|
method_source (~> 0.9.0)
|
||||||
@ -300,12 +285,6 @@ GEM
|
|||||||
thor (>= 0.19.0, < 2.0)
|
thor (>= 0.19.0, < 2.0)
|
||||||
rainbow (3.0.0)
|
rainbow (3.0.0)
|
||||||
rake (13.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)
|
rb-fchange (0.0.6)
|
||||||
ffi
|
ffi
|
||||||
rb-fsevent (0.10.3)
|
rb-fsevent (0.10.3)
|
||||||
@ -403,14 +382,6 @@ GEM
|
|||||||
uglifier (4.2.0)
|
uglifier (4.2.0)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
unicode-display_width (1.6.0)
|
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)
|
warden (1.2.8)
|
||||||
rack (>= 2.0.6)
|
rack (>= 2.0.6)
|
||||||
websocket-driver (0.7.1)
|
websocket-driver (0.7.1)
|
||||||
@ -477,7 +448,6 @@ DEPENDENCIES
|
|||||||
sprockets (~> 3.7)
|
sprockets (~> 3.7)
|
||||||
turbolinks
|
turbolinks
|
||||||
uglifier
|
uglifier
|
||||||
upmin-admin
|
|
||||||
|
|
||||||
RUBY VERSION
|
RUBY VERSION
|
||||||
ruby 2.6.0p0
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
mount Upmin::Engine => '/admin'
|
|
||||||
root to: 'visitors#index'
|
root to: 'visitors#index'
|
||||||
get '/play-now', to: 'tables#play_now', as: 'play_now'
|
get '/play-now', to: 'tables#play_now', as: 'play_now'
|
||||||
devise_for :users, controllers: { registrations: "users/registrations" }
|
devise_for :users, controllers: { registrations: "users/registrations" }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user