Skip to content

Commit 66450ad

Browse files
authored
Merge pull request #184 from topcoder-platform/develop
Prod deploy - post DB rebuild
2 parents a60af6d + 742a3ad commit 66450ad

File tree

7 files changed

+5554
-26
lines changed

7 files changed

+5554
-26
lines changed

config/vanilla/bootstrap.early.php

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@
5151
saveToConfig('Plugins.Topcoder.SSO.Auth0Domain', getenv('TOPCODER_PLUGIN_SSO_AUTH0DOMAIN'));
5252
saveToConfig('Plugins.Topcoder.SSO.AuthorizationURI', '/v3/authorizations/1');
5353
saveToConfig('Plugins.Topcoder.SSO.CookieName', 'v3jwt',false);
54-
saveToConfig('Plugins.Topcoder.SSO.TopcoderRS256.ID', getenv('TOPCODER_PLUGIN_SSO_TOPCODER_RS256_ID'), 'BXWXUWnilVUPdN01t2Se29Tw2ZYNGZvH');
55-
saveToConfig('Plugins.Topcoder.SSO.TopcoderHS256.ID', getenv('TOPCODER_PLUGIN_SSO_TOPCODER_HS256_ID'), 'JFDo7HMkf0q2CkVFHojy3zHWafziprhT');
54+
saveToConfig('Plugins.Topcoder.SSO.TopcoderRS256.ID', getenv('TOPCODER_PLUGIN_SSO_TOPCODER_RS256_ID'), false);
55+
saveToConfig('Plugins.Topcoder.SSO.TopcoderHS256.ID', getenv('TOPCODER_PLUGIN_SSO_TOPCODER_HS256_ID'), false);
56+
5657
saveToConfig('Plugins.Topcoder.SSO.TopcoderHS256.Secret', getenv('TOPCODER_HS256_SECRET') );
5758
saveToConfig('Plugins.Topcoder.SSO.TopcoderRS256.UsernameClaim', 'nickname',false);
5859
saveToConfig('Plugins.Topcoder.SSO.TopcoderHS256.UsernameClaim', 'handle',false);
@@ -96,27 +97,6 @@
9697
saveToConfig('Recaptcha.PublicKey', getenv('RECAPTCHA_PLUGIN_PUBLIC_KEY'), false);
9798
}
9899

99-
100-
// Fix: OAuth 2 SSO should be inactive and not by default. It should be removed later.
101-
if ($SQL->getWhere('UserAuthenticationProvider', ['AuthenticationKey' => 'oauth2'])->numRows() > 0) {
102-
$SQL->update('UserAuthenticationProvider')
103-
->set('Active', 0)
104-
->set('IsDefault',0)
105-
->where('AuthenticationKey' , 'oauth2')->put();
106-
}
107-
108-
// Add Topcoder User Authentication Provider.
109-
// SignInUrl/SignOutUrl should be set in Topcoder plugin's setup; otherwise they couldn't be updated in DB
110-
if ($SQL->getWhere('UserAuthenticationProvider', ['AuthenticationKey' => 'topcoder'])->numRows() == 0) {
111-
$SQL->insert('UserAuthenticationProvider', [
112-
'AuthenticationKey' => 'topcoder',
113-
'AuthenticationSchemeAlias' => 'topcoder',
114-
'Name' => 'topcoder',
115-
'Active' => 1,
116-
'IsDefault' => 1
117-
]);
118-
}
119-
120100
// Fix: Add the 'topcoder' role type in Role Table. It should be removed after upgrading existing DB.
121101
// The Topcoder plugin's setup method will upgrade DB during Vanilla installation
122102
$SQL->query('alter table GDN_Role modify Type enum(\'topcoder\', \'guest\', \'unconfirmed\', \'applicant\', \'member\', \'moderator\', \'administrator\')');

0 commit comments

Comments
 (0)