Skip to content

Commit 0c2461e

Browse files
author
James Cori
committed
Merge branch 'master' into develop
2 parents 9d49bb5 + 9d88385 commit 0c2461e

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/common/helper.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -865,11 +865,7 @@ async function _filterChallengesByGroupsAccess (currentUser, challenges) {
865865
async function ensureAccessibleByGroupsAccess (currentUser, challenge) {
866866
const filtered = await _filterChallengesByGroupsAccess(currentUser, [challenge])
867867
if (filtered.length === 0) {
868-
throw new errors.ForbiddenError(`helper ensureAcessibilityToModifiedGroups :: You don't have access to this group!
869-
Current user: ${JSON.stringify(currentUser)}
870-
Challenge: ${JSON.stringify(challenge)}
871-
Filtered: ${JSON.stringify(filtered)}
872-
`)
868+
throw new errors.ForbiddenError("helper ensureAcessibilityToModifiedGroups :: You don't have access to this group!")
873869
}
874870
}
875871

src/services/ChallengeService.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,7 @@ async function ensureAcessibilityToModifiedGroups (currentUser, data, challenge)
112112
const updatedGroups = _.difference(_.union(challenge.groups, data.groups), _.intersection(challenge.groups, data.groups))
113113
const filtered = updatedGroups.filter(g => !userGroupsIds.includes(g))
114114
if (filtered.length > 0) {
115-
throw new errors.ForbiddenError(`ensureAcessibilityToModifiedGroups :: You don't have access to this group!
116-
Current User: ${JSON.stringify(currentUser)}
117-
Data: ${JSON.stringify(data)}
118-
Challenge: ${JSON.stringify(challenge)}
119-
Filtered: ${JSON.stringify(filtered)}
120-
`)
115+
throw new errors.ForbiddenError("ensureAcessibilityToModifiedGroups :: You don't have access to this group!")
121116
}
122117
}
123118

0 commit comments

Comments
 (0)