openstax_accounts 9.0.4 → 9.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
  SHA256:
3
- metadata.gz: 90b87730485400afb68d52f5ffc0c2c54348a8ccc4a0484afdbade1c10a7e9ae
4
- data.tar.gz: 31a2ce0e354d58d33313260f5c125649b5a1c0124ef6362a61123afdeb5bb834
3
+ metadata.gz: ffaa6e6017568ff2aec46e9e34189be66aee407ab518efc713f5632b1cdfcc2e
4
+ data.tar.gz: c990c936f23ca170bb15f99f52ed1265874881fc4f264b443c6acb9805181888
5
5
  SHA512:
6
- metadata.gz: 022e79a44e3d134d1661fc7087a5bab2937e256c8f3ac9d3a5096790758f4a59175c8940a85753b78574294f0a3f277c2723d22d51efd4d121af902fbc0d1fd3
7
- data.tar.gz: 6f62aac96d93356f27631c2edbc70e4434942da615069939be98a151bb03e24788aaff320b450f1ef31a4492bfd2854f1904d80172122753607d9f675a3de6d8
6
+ metadata.gz: bdb1fcf467f575dde03294f690fc8ddace34c812bdd91ac92027a810d32c36668a725de64469e050039ad77ffe247b084125107a99777773c2e38bece3720967
7
+ data.tar.gz: c1c1f7b32f71f9e91e771f20804f66b444aae41a32b4d6032ab97a63f3d76aad562e00d070f1ca991779e74efde627cc1684b3d8661dadcc44a06d915273060f
@@ -10,8 +10,7 @@ module OpenStax
10
10
  if configuration.enable_stubbing?
11
11
  redirect_to dev_accounts_path
12
12
  else
13
- forwardable_params =
14
- params.permit(*configuration.forwardable_login_param_keys.map(&:to_s)).to_h
13
+ forwardable_params = params.permit(*configuration.forwardable_login_params).to_h
15
14
  redirect_to openstax_login_path(forwardable_params)
16
15
  end
17
16
  end
@@ -16,7 +16,8 @@ module OpenStax::Accounts
16
16
  :salesforce_contact_id,
17
17
  :support_identifier,
18
18
  :is_test,
19
- :is_kip
19
+ :is_kip,
20
+ :grant_tutor_access
20
21
  ]
21
22
 
22
23
  attr_accessor :syncing
@@ -117,6 +117,12 @@ module OpenStax
117
117
  schema_info: {
118
118
  description: 'Whether or not this is a Key Institutional Partner account'
119
119
  }
120
+
121
+ property :grant_tutor_access,
122
+ type: :boolean,
123
+ schema_info: {
124
+ description: 'Whether or not the account should be granted Tutor access'
125
+ }
120
126
  end
121
127
  end
122
128
  end
@@ -7,7 +7,8 @@ module OpenStax
7
7
 
8
8
  def exec(email: nil, username: nil, password: nil, first_name: nil, last_name: nil,
9
9
  full_name: nil, title: nil, salesforce_contact_id: nil, faculty_status: nil,
10
- role: nil, school_type: nil, school_location: nil, is_test: nil)
10
+ role: nil, school_type: nil, school_location: nil, is_kip: nil,
11
+ grant_tutor_access: nil, is_test: nil)
11
12
  raise(
12
13
  ArgumentError,
13
14
  'You must specify either an email address or a username (and an optional password)'
@@ -23,7 +24,8 @@ module OpenStax
23
24
  email: email, username: username, password: password,
24
25
  first_name: first_name, last_name: last_name, full_name: full_name,
25
26
  salesforce_contact_id: salesforce_contact_id, faculty_status: faculty_status,
26
- role: role, school_type: school_type, school_location: school_location, is_test: is_test
27
+ role: role, school_type: school_type, school_location: school_location,
28
+ is_kip: is_kip, grant_tutor_access: grant_tutor_access, is_test: is_test
27
29
  )
28
30
  fatal_error(code: :invalid_inputs) unless (200..202).include?(response.status)
29
31
 
@@ -47,6 +49,8 @@ module OpenStax
47
49
  account.school_type = school_type || :unknown_school_type
48
50
  account.school_location = school_location || :unknown_school_location
49
51
  account.support_identifier = support_identifier
52
+ account.is_kip = is_kip
53
+ account.grant_tutor_access = grant_tutor_access
50
54
  account.is_test = is_test
51
55
  end
52
56
 
@@ -0,0 +1,5 @@
1
+ class AddGrantTutorAccessToOpenStaxAccountsAccounts < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :openstax_accounts_accounts, :grant_tutor_access, :boolean
4
+ end
5
+ end
@@ -60,9 +60,9 @@ module OpenStax
60
60
  # to the default Accounts logout URL.
61
61
  attr_writer :logout_redirect_url
62
62
 
63
- # forwardable_login_param_keys
63
+ # forwardable_login_params
64
64
  # Which params are forwarded on the accounts login path
65
- attr_accessor :forwardable_login_param_keys
65
+ attr_accessor :forwardable_login_params
66
66
 
67
67
  # max_user_updates_per_request
68
68
  # When the user profile sync operation is called, this parameter will limit
@@ -119,10 +119,10 @@ module OpenStax
119
119
  @max_search_items = 10
120
120
  @logout_redirect_url = nil
121
121
  @return_to_url_approver = nil
122
- @forwardable_login_param_keys = [
122
+ @forwardable_login_params = [
123
123
  :signup_at,
124
124
  :go,
125
- :sp # "signed payload"; "sp" for short to keep nested parameter names short
125
+ sp: {} # "signed payload"; "sp" to keep nested parameter names short.
126
126
  ]
127
127
  @max_user_updates_per_request = 250
128
128
  @sso_cookie_name = 'ox'
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Accounts
3
- VERSION = '9.0.4'
3
+ VERSION = '9.4.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_accounts
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.4
4
+ version: 9.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Slavinsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-29 00:00:00.000000000 Z
11
+ date: 2020-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "<"
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.0'
19
+ version: '5.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "<"
24
+ - - ">"
25
25
  - !ruby/object:Gem::Version
26
- version: '6.0'
26
+ version: '5.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -343,6 +343,7 @@ files:
343
343
  - db/migrate/15_drop_accounts_groups.rb
344
344
  - db/migrate/16_add_is_kip_to_openstax_accounts_accounts.rb
345
345
  - db/migrate/17_add_school_location_to_openstax_accounts_accounts.rb
346
+ - db/migrate/18_add_grant_tutor_access_to_openstax_accounts_accounts.rb
346
347
  - db/migrate/1_create_openstax_accounts_groups.rb
347
348
  - db/migrate/2_create_openstax_accounts_group_members.rb
348
349
  - db/migrate/3_create_openstax_accounts_group_owners.rb