Skip to content

Commit 33b6251

Browse files
author
Raushan Kumar Raman
committed
feat: added pg_hero and authentication for all_casa_admin user
1 parent a64ff55 commit 33b6251

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ gem "wicked"
5959
gem "flipper"
6060
gem "flipper-active_record"
6161
gem "flipper-ui"
62-
gem 'pghero'
63-
gem 'pg_query'
62+
gem "pghero"
63+
gem "pg_query"
6464
group :development, :test do
6565
gem "bullet" # Detect and fix N+1 queries
6666
gem "byebug", platforms: %i[mri mingw x64_mingw] # Call 'byebug' anywhere in the code to stop execution and get a debugger console

config/routes.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
devise_for :all_casa_admins, path: "all_casa_admins", controllers: {sessions: "all_casa_admins/sessions"}
1919
devise_for :users, controllers: {sessions: "users/sessions", passwords: "users/passwords"}
2020
authenticate :all_casa_admins do
21-
mount PgHero::Engine, at: 'pg_dashboard', constraints: lambda { |request|
22-
admin = request.env['warden'].user(:all_casa_admin)
23-
admin.present? && (admin.role == 'All Casa Admin' || admin.casa_admin?)
24-
}
21+
mount PgHero::Engine, at: "pg_dashboard", constraints: lambda { |request|
22+
admin = request.env["warden"].user(:all_casa_admin)
23+
admin.present? && (admin.role == "All Casa Admin" || admin.casa_admin?)
24+
}
2525
end
2626

2727
concern :with_datatable do

0 commit comments

Comments
 (0)