Skip to content

Commit aadc62b

Browse files
author
Dushyant Bhalgami
authored
Merge branch 'master' into develop
2 parents d40ba18 + df016ed commit aadc62b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/common/helper.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ function autoWrapExpress (obj) {
6565
function getBusApiClient () {
6666
// If there is no Client instance, Create a new instance
6767
if (!busApiClient) {
68+
logger.debug(`Creating Bus API client for ${config.BUSAPI_URL} `)
6869
busApiClient = busApi(_.pick(config,
6970
['AUTH0_URL', 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME',
7071
'AUTH0_CLIENT_ID', 'AUTH0_CLIENT_SECRET', 'BUSAPI_URL',
7172
'KAFKA_ERROR_TOPIC', 'AUTH0_PROXY_SERVER_URL']))
7273
}
7374

75+
logger.debug('returning Bus API client')
7476
return busApiClient
7577
}
7678

src/services/SubmissionService.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ function * createSubmission (authUser, files, entity) {
273273
}
274274

275275
logger.info('Check User access before creating the submission')
276-
if (_.intersection(authUser.roles, ['Administrator']).length === 0 && !authUser.scopes) {
276+
if (_.intersection(authUser.roles, ['Administrator', 'administrator']).length === 0 && !authUser.scopes) {
277277
yield helper.checkCreateAccess(authUser, item)
278278
}
279279

@@ -304,8 +304,8 @@ function * createSubmission (authUser, files, entity) {
304304
reqBody['payload']['isFileSubmission'] = false
305305
}
306306

307-
logger.info('Prepared submission create event payload to pass to THE bus')
308-
307+
logger.info('Prepared submission create event payload to pass to the Bus')
308+
logger.info(`Posting to bus ${reqBody}`)
309309
// Post to Bus API using Client
310310
yield helper.postToBusApi(reqBody)
311311

0 commit comments

Comments
 (0)