File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ module.exports = {
5656 10076 : '邮箱已被使用,请重新填入新的邮箱' ,
5757 10077 : '不可将用户分配给不存在的分组' ,
5858 10078 : '不可修改root用户的分组' ,
59- 10079 : 'root分组和guest分组的用户不可删除 ' ,
59+ 10079 : 'root分组的用户不可删除 ' ,
6060 10080 : '请求方法不允许' ,
6161 10100 : '刷新令牌获取失败' ,
6262 10110 : '{name}大小不能超过{size}字节' ,
Original file line number Diff line number Diff line change @@ -102,15 +102,13 @@ class AdminDao {
102102 code : 10021
103103 } ) ;
104104 }
105- const rootOrGuest = await UserGroupModel . findOne ( {
105+ const root = await UserGroupModel . findOne ( {
106106 where : {
107- group_id : {
108- [ Op . in ] : [ GroupLevel . Root , GroupLevel . Guest ]
109- } ,
107+ group_id : GroupLevel . Root ,
110108 user_id : id
111109 }
112110 } )
113- if ( rootOrGuest ) {
111+ if ( root ) {
114112 throw new Forbidden ( {
115113 code : 10079
116114 } )
You can’t perform that action at this time.
0 commit comments