Skip to content

Commit cee65ee

Browse files
Remove role check for M2M tokens
1 parent b9ef113 commit cee65ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/SubmissionService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function * getSubmission (authUser, submissionId) {
9090
}
9191

9292
logger.info('Check User access before returning the submission')
93-
if (_.intersection(authUser.roles, ['Administrator']).length === 0) {
93+
if (_.intersection(authUser.roles, ['Administrator']).length === 0 && !authUser.scopes) {
9494
yield helper.checkGetAccess(authUser, submissionRecord)
9595
}
9696

@@ -205,7 +205,7 @@ function * createSubmission (authUser, files, entity) {
205205
}
206206

207207
logger.info('Check User access before creating the submission')
208-
if (_.intersection(authUser.roles, ['Administrator']).length === 0) {
208+
if (_.intersection(authUser.roles, ['Administrator']).length === 0 && !authUser.scopes) {
209209
yield helper.checkCreateAccess(authUser, item)
210210
}
211211

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy