openstax_accounts 9.0.3 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/openstax/accounts/sessions_controller.rb +1 -2
- data/app/models/openstax/accounts/account.rb +3 -15
- data/app/representers/openstax/accounts/api/v1/account_representer.rb +4 -8
- data/app/routines/openstax/accounts/sync_accounts.rb +1 -0
- data/lib/openstax/accounts/configuration.rb +4 -4
- data/lib/openstax/accounts/version.rb +1 -1
- metadata +6 -7
- data/db/migrate/16_add_is_kip_to_openstax_accounts_accounts.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94c7f3a9d37b020069be2c39b96a1f7beacb918d50e87aa84d70fe24d437025c
|
4
|
+
data.tar.gz: 9a857efcee527418bd4287d6b8a61c369fa424541358de01b3dc41f1ae8e3aa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 831790e591d38994596ff471d0828b773a8fd770253bf7040ed4c1106b2979e944b9a5ce5777cc89271c552cdb8fb50b7cfb239e316b1251713fe81f960e9237
|
7
|
+
data.tar.gz: fa14a2404033df1bc6131f6a1b91c134c98bda24d16af737f3442b52ea9b3de1c1933f463ac7c46060cef64fac02e73628990d936f35a7a0bdf1b93a99d6290c
|
@@ -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
|
@@ -14,18 +14,12 @@ module OpenStax::Accounts
|
|
14
14
|
:school_type,
|
15
15
|
:salesforce_contact_id,
|
16
16
|
:support_identifier,
|
17
|
-
:is_test
|
18
|
-
:is_kip
|
17
|
+
:is_test
|
19
18
|
]
|
20
19
|
|
21
20
|
attr_accessor :syncing
|
22
21
|
|
23
|
-
enum faculty_status: [
|
24
|
-
:no_faculty_info,
|
25
|
-
:pending_faculty,
|
26
|
-
:confirmed_faculty,
|
27
|
-
:rejected_faculty
|
28
|
-
]
|
22
|
+
enum faculty_status: [:no_faculty_info, :pending_faculty, :confirmed_faculty, :rejected_faculty]
|
29
23
|
enum role: [
|
30
24
|
:unknown_role,
|
31
25
|
:student,
|
@@ -37,13 +31,7 @@ module OpenStax::Accounts
|
|
37
31
|
:adjunct,
|
38
32
|
:homeschool
|
39
33
|
]
|
40
|
-
enum school_type: [
|
41
|
-
:unknown_school_type,
|
42
|
-
:other_school_type,
|
43
|
-
:college,
|
44
|
-
:high_school,
|
45
|
-
:k12_school
|
46
|
-
]
|
34
|
+
enum school_type: [:unknown_school_type, :other_school_type, :college]
|
47
35
|
|
48
36
|
validates :faculty_status, :role, :school_type, presence: true
|
49
37
|
|
@@ -5,6 +5,7 @@ module OpenStax
|
|
5
5
|
module Api
|
6
6
|
module V1
|
7
7
|
class AccountRepresenter < Roar::Decorator
|
8
|
+
|
8
9
|
# This representer is used to communicate with Accounts
|
9
10
|
# and so must allow read/write on all properties
|
10
11
|
# Do not use it in create/update APIs!
|
@@ -88,26 +89,21 @@ module OpenStax
|
|
88
89
|
property :uuid,
|
89
90
|
type: String,
|
90
91
|
schema_info: {
|
91
|
-
description:
|
92
|
+
description: "The UUID as set by Accounts"
|
92
93
|
}
|
93
94
|
|
94
95
|
property :support_identifier,
|
95
96
|
type: String,
|
96
97
|
schema_info: {
|
97
|
-
description:
|
98
|
+
description: "The support_identifier as set by Accounts"
|
98
99
|
}
|
99
100
|
|
100
101
|
property :is_test,
|
101
102
|
type: :boolean,
|
102
103
|
schema_info: {
|
103
|
-
description:
|
104
|
+
description: "Whether or not this is a test account"
|
104
105
|
}
|
105
106
|
|
106
|
-
property :is_kip,
|
107
|
-
type: :boolean,
|
108
|
-
schema_info: {
|
109
|
-
description: 'Whether or not this is a Key Institutional Partner account'
|
110
|
-
}
|
111
107
|
end
|
112
108
|
end
|
113
109
|
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
|
-
#
|
63
|
+
# forwardable_login_params
|
64
64
|
# Which params are forwarded on the accounts login path
|
65
|
-
attr_accessor :
|
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
|
-
@
|
122
|
+
@forwardable_login_params = [
|
123
123
|
:signup_at,
|
124
124
|
:go,
|
125
|
-
:
|
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'
|
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
|
+
version: 9.1.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-04-
|
11
|
+
date: 2020-04-10 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: '
|
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: '
|
26
|
+
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: omniauth
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -341,7 +341,6 @@ files:
|
|
341
341
|
- db/migrate/13_add_school_type_to_accounts_accounts.rb
|
342
342
|
- db/migrate/14_drop_openstax_uid_and_username_uniqueness.rb
|
343
343
|
- db/migrate/15_drop_accounts_groups.rb
|
344
|
-
- db/migrate/16_add_is_kip_to_openstax_accounts_accounts.rb
|
345
344
|
- db/migrate/1_create_openstax_accounts_groups.rb
|
346
345
|
- db/migrate/2_create_openstax_accounts_group_members.rb
|
347
346
|
- db/migrate/3_create_openstax_accounts_group_owners.rb
|