strongmind-auth 1.1.85 → 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: 0603240cd0611c8ebc893ea92f1ef516b354eedf559535aad6f86a9dc52a4fd5
4
- data.tar.gz: 5d5361c33fb59d32b1502896c17c5bb377654539b84cda2974a47bea19fc145c
3
+ metadata.gz: 68d4f820dabda4457f35f915c07b4bc6c1c8b38549cd1b69e9a14d8a6697cad7
4
+ data.tar.gz: 1efa85b966114ed8e9550e145101bfcdb1a8b6823797b965caddce8838805dbf
5
5
  SHA512:
6
- metadata.gz: bc102f6517e367dae3274ab86bfeb0bc6d631fb1b0b73accd082e6cd876488d9cd38acd010f9b348521116e13e822b8f30aaa08d81454cfbb8ff13e6c99bacff
7
- data.tar.gz: 31693ef186994a153fc0c87b191286fffd5381273be08e811b7d2ada76eb02250d7c5bb510eb211a044c47a521bac74a5ff4a3cff343f848990c70ab894fbd4f
6
+ metadata.gz: e718fffd7528f4a2c2581e5d43b179d0ea365bcea5604b2a83876740e29034282e4ab26b51425844fdbb752bab4d4a9cacb0a8cfc6208de964cb6e35486a10c1
7
+ data.tar.gz: 001fc752ef39f9d961ff99eca8ea7137a58121212a77d34504cf2c0c265060fd0f886de789872726100e93d2795f58b562ca4d5ae6d978955f61fc4f5d0638ad
@@ -6,7 +6,7 @@ module StrongMindNav
6
6
 
7
7
  def fetch_common_nav
8
8
  begin
9
- navbar = Strongmind::CommonNavFetcher.new(current_user, request).retrieve(menu_items)
9
+ navbar = Strongmind::CommonNavFetcher.new(current_user, request).retrieve(common_nav_options)
10
10
 
11
11
  @top_navbar_html = navbar[:top_navbar_html]
12
12
  @bottom_navbar_html = navbar[:bottom_navbar_html]
@@ -31,4 +31,11 @@ module StrongMindNav
31
31
  ]
32
32
  end
33
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
34
41
  end
@@ -1,5 +1,5 @@
1
1
  module Strongmind
2
2
  module Auth
3
- VERSION = "1.1.85"
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)
31
- response = fetch_navbar_data(build_nav_items(menu_items))
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,12 @@ 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)
50
+ def fetch_navbar_data(nav_items, nav_options)
51
51
  session = refresh_session
52
52
  access_token = session[:access_token]
53
53
 
54
- connection.post(navbar_endpoint, nav_items.to_json, 'Authorization' => "Bearer #{access_token}")
54
+ payload = nav_items.merge({ authenticity_token: nav_options[:authenticity_token], show_role_switcher: nav_options[:show_role_switcher] }).to_json
55
+ connection.post(navbar_endpoint, payload, 'Authorization' => "Bearer #{access_token}")
55
56
  end
56
57
 
57
58
  def connection
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.85
4
+ version: 1.1.87
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Belding
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-23 00:00:00.000000000 Z
11
+ date: 2024-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails