bullet_train 1.0.24 → 1.0.25
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f53e93d30c7a323663e913316ef0d2b705a052ab3f8f075e0ea25bcfb233f8ec
|
4
|
+
data.tar.gz: 8e33b7ca547682b3cc6b045167ecef56c133c15dd3b2e1996dd660af7871929b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a676d76f96eedefab979c6c6dd3b871351133fb799e0b0618748b2738831ab444e814ddfe3634cd19bd408ad844e43901eac091c836156039865e78618bb7b2
|
7
|
+
data.tar.gz: 9f99942b4e68d2a21468fd557edaf14796482f69b385e5b1115af71eabce415d5968d418bb29525da65fd6d88344665cc06d5b4c2e6de0549bba02e76a6b39a5
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module InviteOnlySupport
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
def invitation
|
5
|
+
return not_found unless invitation_only?
|
6
|
+
return not_found unless params[:key].present?
|
7
|
+
return not_found unless invitation_keys.include?(params[:key])
|
8
|
+
session[:invitation_key] = params[:key]
|
9
|
+
if user_signed_in?
|
10
|
+
redirect_to new_account_team_path
|
11
|
+
else
|
12
|
+
redirect_to new_user_registration_path
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def not_found
|
17
|
+
render file: "#{Rails.root}/public/404.html", layout: false, status: :not_found
|
18
|
+
end
|
19
|
+
end
|
data/config/routes.rb
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
+
scope module: "public" do
|
3
|
+
root to: "home#index"
|
4
|
+
get "invitation" => "home#invitation", :as => "invitation"
|
5
|
+
|
6
|
+
if Rails.env.production? ? ENV["ENABLE_DOCS"].present? : true
|
7
|
+
get "docs", to: "home#docs"
|
8
|
+
get "docs/*page", to: "home#docs"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
2
12
|
namespace :account do
|
3
13
|
shallow do
|
14
|
+
# TODO we need to either implement a dashboard or deprecate this.
|
15
|
+
root to: "dashboard#index", as: "dashboard"
|
16
|
+
|
4
17
|
resource :two_factor, only: [:create, :destroy]
|
5
18
|
|
6
19
|
# user-level onboarding tasks.
|
data/lib/bullet_train/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
@@ -373,7 +373,10 @@ files:
|
|
373
373
|
- app/controllers/concerns/account/users/controller_base.rb
|
374
374
|
- app/controllers/concerns/controllers/base.rb
|
375
375
|
- app/controllers/concerns/devise_current_attributes.rb
|
376
|
+
- app/controllers/concerns/documentation_support.rb
|
377
|
+
- app/controllers/concerns/invite_only_support.rb
|
376
378
|
- app/controllers/concerns/registrations/controller_base.rb
|
379
|
+
- app/controllers/concerns/root_redirect.rb
|
377
380
|
- app/controllers/concerns/sessions/controller_base.rb
|
378
381
|
- app/controllers/registrations_controller.rb
|
379
382
|
- app/controllers/sessions_controller.rb
|