strongmind-auth 1.1.86 → 1.1.87

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: 0726b64bdd92646f5321f5f6050ea0d097752e7407bb4a1b87b3c1352703c0a8
4
- data.tar.gz: ece8fc306bfcaf1d89a8cbdc02271a99c47bb85851d65d0883e2d70cf99187d6
3
+ metadata.gz: 68d4f820dabda4457f35f915c07b4bc6c1c8b38549cd1b69e9a14d8a6697cad7
4
+ data.tar.gz: 1efa85b966114ed8e9550e145101bfcdb1a8b6823797b965caddce8838805dbf
5
5
  SHA512:
6
- metadata.gz: '02497ab7508a71d2f538825d09a6e94439c75030d3df1a92a42083f3bc8c8bc5b9f94e2d26384de3c8ed5d6f84ab23c99163c4081d7dcb557d66bf1840a0b658'
7
- data.tar.gz: 2e4fa4e9de34ca86ca779c38968136f46ce81dcc07b1ab7620cb0814cfb264bee2a04acbf7756247b23b42d8a7aab660d6a45b257beb7a4efb282885c3038819
6
+ metadata.gz: e718fffd7528f4a2c2581e5d43b179d0ea365bcea5604b2a83876740e29034282e4ab26b51425844fdbb752bab4d4a9cacb0a8cfc6208de964cb6e35486a10c1
7
+ data.tar.gz: 001fc752ef39f9d961ff99eca8ea7137a58121212a77d34504cf2c0c265060fd0f886de789872726100e93d2795f58b562ca4d5ae6d978955f61fc4f5d0638ad
@@ -6,8 +6,7 @@ module StrongMindNav
6
6
 
7
7
  def fetch_common_nav
8
8
  begin
9
- authenticity_token = form_authenticity_token
10
- navbar = Strongmind::CommonNavFetcher.new(current_user, request).retrieve(menu_items, authenticity_token)
9
+ navbar = Strongmind::CommonNavFetcher.new(current_user, request).retrieve(common_nav_options)
11
10
 
12
11
  @top_navbar_html = navbar[:top_navbar_html]
13
12
  @bottom_navbar_html = navbar[:bottom_navbar_html]
@@ -32,4 +31,11 @@ module StrongMindNav
32
31
  ]
33
32
  end
34
33
 
34
+ def common_nav_options
35
+ {
36
+ menu_items: menu_items,
37
+ authenticity_token: form_authenticity_token,
38
+ show_role_switcher: false
39
+ }
40
+ end
35
41
  end
@@ -1,5 +1,5 @@
1
1
  module Strongmind
2
2
  module Auth
3
- VERSION = "1.1.86"
3
+ VERSION = "1.1.87"
4
4
  end
5
5
  end
@@ -27,8 +27,8 @@ module Strongmind
27
27
  )
28
28
  end
29
29
 
30
- def retrieve(menu_items, authenticity_token)
31
- response = fetch_navbar_data(build_nav_items(menu_items), authenticity_token)
30
+ def retrieve(nav_options)
31
+ response = fetch_navbar_data(build_nav_items(nav_options[:menu_items]), nav_options)
32
32
  parse_navbar(response)
33
33
  end
34
34
 
@@ -47,11 +47,11 @@ module Strongmind
47
47
  path_to_compare.include?(sanitized_path) || path_to_compare.include?(sanitized_path.pluralize)
48
48
  end
49
49
 
50
- def fetch_navbar_data(nav_items, authenticity_token)
50
+ def fetch_navbar_data(nav_items, nav_options)
51
51
  session = refresh_session
52
52
  access_token = session[:access_token]
53
53
 
54
- payload = nav_items.merge(authenticity_token: ).to_json
54
+ payload = nav_items.merge({ authenticity_token: nav_options[:authenticity_token], show_role_switcher: nav_options[:show_role_switcher] }).to_json
55
55
  connection.post(navbar_endpoint, payload, 'Authorization' => "Bearer #{access_token}")
56
56
  end
57
57
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.86
4
+ version: 1.1.87
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Belding