Commit aa41b0c 1 parent cce4787 commit aa41b0c Copy full SHA for aa41b0c
File tree 5 files changed +211
-143
lines changed
DBMaintenance/version_updates
5 files changed +211
-143
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "LiDA-Europe" : {
3
+ "name" : " Aspen-LiDA" ,
4
+ "slug" : " aspen-lida" ,
5
+ "scheme" : " aspenlida" ,
6
+ "easId" : " d0550b19-7df2-4a61-9fe1-e063f51e778e" ,
7
+ "reverseDns" : " com.jacobomara9011.aspenlida" ,
8
+ "discoveryUrl" : " https://greenhouse.aspendiscovery.co.uk/" ,
9
+ "greenhouseUrl" : " https://greenhouse.aspendiscovery.co.uk/" ,
10
+ "libraryId" : " 1" ,
11
+ "themeId" : " 1" ,
12
+ "background" : " #ffffff" ,
13
+ "sentryProject" : " aspen-lida" ,
14
+ "sentryAuth" : " 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" ,
15
+ "sentryDsn" : " https://148acf47870cac6cce07e74327a60e0c@o4506319477604352.ingest.us.sentry.io/4506319478980608" ,
16
+ "ascAppId" : " 6475778273" ,
17
+ "appleTeamId" : " A2N3J9ACDY" ,
18
+ "ascApiKeyPath" : " 0" ,
19
+ "ascApiKeyIssuerId" : " e5007c12-0b4e-4d61-b7c0-0fe5d0a00e02" ,
20
+ "ascApiKeyId" : " 6D59Y34BU4" ,
21
+ "googleServiceKeyPath" : " ./GOOGLE_SERVICES_JSON"
22
+ }
23
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "expoProjectOwner" : " jacobomara9011" ,
3
+ "versionCode" : " 1" ,
4
+ "buildCode" : " 1" ,
5
+ "sentryProjectOwner" : " jacobomara9011" ,
6
+ "sentryAuthToken" : " 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" ,
7
+ "devAppleId" : " jacob.omara@ptfs-europe.com" ,
8
+ "ascApiKeyPath" : " not_needed" ,
9
+ "ascApiKeyIssuerId" : " e5007c12-0b4e-4d61-b7c0-0fe5d0a00e02" ,
10
+ "ascApiKeyId" : " 6D59Y34BU4" ,
11
+ "googleServiceKeyPath" : " ./GOOGLE_SERVICES_JSON" ,
12
+ "greenhouseUrl" : " https://greenhouse.aspendiscovery.co.uk/" ,
13
+ "language" : " English" ,
14
+ "country" : " United Kingdom" ,
15
+ "googleApiKeyAndroid" : " 1" ,
16
+ "googleApiKeyApple" : " 2"
17
+ }
Original file line number Diff line number Diff line change @@ -205,17 +205,23 @@ public function validateAccount() {
205
205
$ ssoArray = $ this ->mapSAMLAttributesToSSOArray ($ attributes );
206
206
207
207
if ($ this ->ssoAuthOnly === false ) {
208
- $ ilsUserArray = $ this ->setupILSUser ($ ssoArray );
209
- if (!$ this ->validateWithILS ($ ssoArray )) {
210
- if ($ this ->selfRegister ($ ilsUserArray )) {
211
- return $ this ->validateWithILS ($ ssoArray );
212
- } else {
208
+ $ ilsUserArray = $ this ->setupILSUser ($ ssoArray );
209
+ if (!$ this ->validateWithILS ($ ssoArray )) {
210
+ if ($ this ->config ->createUserInIls ) {
211
+ if ($ this ->selfRegister ($ ilsUserArray )) {
212
+ return $ this ->validateWithILS ($ ssoArray );
213
+ } else {
213
214
AspenError::raiseError (new AspenError ('Unable to register a new account with ILS during SAML authentication. ' ));
214
215
return false ;
216
+ }
217
+ } else {
218
+ AspenError::raiseError (new AspenError ('User does not exist in the ILS and autocreation of ILS users is disabled. ' ));
219
+ return false ;
215
220
}
216
221
} else {
217
222
return $ this ->validateWithILS ($ ssoArray );
218
223
}
224
+
219
225
} else {
220
226
if (!$ this ->validateWithAspen ($ this ->uid )) {
221
227
$ newUser = $ this ->selfRegisterAspenOnly ($ ssoArray );
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class SSOSetting extends DataObject {
14
14
public $ forceReAuth ;
15
15
public $ restrictByIP ;
16
16
public $ updateAccount ;
17
+ public $ createUserInIls ;
17
18
18
19
//oAuth
19
20
public $ clientId ;
@@ -232,7 +233,15 @@ public static function getObjectStructure($context = ''): array {
232
233
'label ' => 'Update users ILS account information with data from the IdP when logging in using the data mapping provided ' ,
233
234
'description ' => 'Whether or not users ILS account information is updated each time they log in using the data mapping provided ' ,
234
235
'default ' => 0 ,
235
- ],
236
+ ],
237
+ 'createUserInIls ' => [
238
+ 'property ' => 'createUserInIls ' ,
239
+ 'type ' => 'checkbox ' ,
240
+ 'label ' => 'Create ILS users when a matching user is not found from the IdP data in the ILS ' ,
241
+ 'description ' => 'Whether or not to automatically create the ILS user if no match is found between IdP data and the ILS. ' ,
242
+ 'default ' => 1 ,
243
+ 'note ' => 'If the user does not exist in the ILS when we sign in to Aspen with SSO, whether we can create that user in the ILS '
244
+ ],
236
245
'oAuthConfigSection ' => [
237
246
'property ' => 'oAuthConfigSection ' ,
238
247
'type ' => 'section ' ,
You can’t perform that action at this time.
0 commit comments