mirror of
https://github.com/certd/certd.git
synced 2026-05-15 04:27:31 +08:00
chore: 修改权限判断字段从summary改成description
This commit is contained in:
@@ -40,13 +40,13 @@ export class AuthorityMiddleware implements IWebMiddleware {
|
||||
await next();
|
||||
return;
|
||||
}
|
||||
const permission = routeInfo.summary;
|
||||
let permission = routeInfo.description || '';
|
||||
permission = permission.trim().split(' ')[0];
|
||||
if (permission == null || permission === '') {
|
||||
ctx.status = 500;
|
||||
ctx.body = Constants.res.serverError('该路由未配置权限控制:' + ctx.path);
|
||||
return;
|
||||
}
|
||||
|
||||
if (permission === Constants.per.guest) {
|
||||
await next();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user