Skip to content

Commit 76befa4

Browse files
committed
removing unused files
1 parent 004fce4 commit 76befa4

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/middleware/middleware.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -176,24 +176,6 @@ async function onlySecretariatOrBulkDownload (req, res, next) {
176176
}
177177
}
178178

179-
async function onlySecretariatUserRegistry (req, res, next) {
180-
const org = req.ctx.org
181-
const registryOrgRepo = req.ctx.repositories.getRegistryOrgRepository()
182-
const CONSTANTS = getConstants()
183-
184-
try {
185-
const isSec = await registryOrgRepo.isSecretariat(org)
186-
if (!isSec) {
187-
logger.info({ uuid: req.ctx.uuid, message: org + ' is NOT a ' + CONSTANTS.AUTH_ROLE_ENUM.SECRETARIAT })
188-
return res.status(403).json(error.secretariatOnly())
189-
}
190-
logger.info({ uuid: req.ctx.uuid, message: 'Confirmed ' + org + 'as a Secretariat' })
191-
next()
192-
} catch (err) {
193-
next(err)
194-
}
195-
}
196-
197179
// Checks that the requester belongs to an org that has the 'SECRETARIAT' role
198180

199181
async function onlySecretariat (req, res, next) {
@@ -577,7 +559,6 @@ module.exports = {
577559
onlySecretariat,
578560
onlySecretariatOrBulkDownload,
579561
onlySecretariatOrAdmin,
580-
onlySecretariatUserRegistry,
581562
onlyCnas,
582563
onlyAdps,
583564
onlyOrgWithPartnerRole,

0 commit comments

Comments
 (0)