phcscriptcdnpro 3.3.5 → 3.4.0

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
  SHA1:
3
- metadata.gz: 616ed61ba7127a1fb6e0566ebf477371b450898b
4
- data.tar.gz: 0d3da5e0e9cca2602059f089d2e5889fe21ce519
3
+ metadata.gz: bfb820fb54b57bb568c8facdc73145d65b028822
4
+ data.tar.gz: 57c394f2966bf11274ea09bca4b3cd4cfba0b945
5
5
  SHA512:
6
- metadata.gz: 700a8b4fd929969916a61b1e254cc337f280a4e8aefab4d23d272db34498e9c27010c9f963c47a0ca5bf568f0b340b5d282a812382d19a2371026ea5c7485d00
7
- data.tar.gz: 6e77e4a5f9e68025d573309b135e91986ff4854f1f11bffbc365c01367c1f7af85f646bee3f6d5096dc68c0c5187aadaed6c9463bdda6fab85e2fd2940d4a1db
6
+ metadata.gz: 71bad8d769d830de2a83bc02164f6e06bfa1f8d39c23ed4881e328c21a31fec6984a6f353ce5a23b9fb19a4ac1991c8d4394540ccb6d0dfee9a28f8be0b1983f
7
+ data.tar.gz: 63773d5ae3d84df8362dd1f27940c2ff04ed2f7bc5b6d4a8c910372d097145ede99b497c25d111e1080f1e3643c4ec379b1ceb291cece418339379847d53d600
@@ -5,6 +5,34 @@ module Phcscriptcdnpro
5
5
  before_action :require_user
6
6
  protect_from_forgery with: :exception
7
7
 
8
+ # Grab Member Information
9
+ def get_member_profile_info
10
+ @members_profile_info = Member::Profile.find(params[:profile_id])
11
+ end
12
+
13
+ # AuthRocket User Helpers
14
+ def require_user
15
+ unless current_user
16
+ params.permit!
17
+ session[:last_url] = request.get? ? url_for(params) : url_for
18
+ redirect_to new_login_url
19
+ end
20
+ end
21
+
22
+ def current_user
23
+ @_current_user ||= AuthRocket::Session.from_token(session[:ar_token]).try(:user)
24
+ end
25
+ helper_method :current_user
26
+
27
+ def new_login_url
28
+ ENV['AUTHROCKET_LOGIN_URL']
29
+ end
30
+ helper_method :new_login_url
31
+
32
+ def membership_info
33
+ AuthRocket::Membership.all(user_id: current_user.id).first
34
+ end
35
+
8
36
  # Load Helpers
9
37
  helper Phctitleseo::Engine.helpers
10
38
  helper Phcnotifi::Engine.helpers
@@ -1,3 +1,3 @@
1
1
  module Phcscriptcdnpro
2
- VERSION = "3.3.5"
2
+ VERSION = "3.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcscriptcdnpro
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.5
4
+ version: 3.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BradPotts