update
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
const ALLOW_GROUPS = new Set(['/professorx'])
|
||||
|
||||
const mod = {}
|
||||
module.exports = mod
|
||||
|
||||
mod.checkAllow = groups => {
|
||||
if (!Array.isArray(groups)) return false
|
||||
|
||||
return groups.filter(t => ALLOW_GROUPS.has(t)).length > 0
|
||||
}
|
||||
@@ -57,7 +57,8 @@ mod.codeMessage = {
|
||||
CodeUnauthorized: { code: 1004, message: 'unauthorized' },
|
||||
CodeForbidden: { code: 1005, message: 'forbidden' },
|
||||
CodeNotFound: { code: 1006, message: 'not found' },
|
||||
CodeInternalError: { code: 1007, message: 'internal error' }
|
||||
CodeInternalError: { code: 1007, message: 'internal error' },
|
||||
CodeAccountNoPermission: { code: 1008, message: 'account no permission' }
|
||||
}
|
||||
|
||||
mod.resp = {
|
||||
|
||||
Reference in New Issue
Block a user