fix: validate im registration platform role

This commit is contained in:
richjohnrambo
2026-09-23 02:51:58 +08:00
parent 22adc13acf
commit 6c338626d6
3 changed files with 79 additions and 1 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ func (s *sSysImRegistration) seedConfig(ctx context.Context) (err error) {
}
func (s *sSysImRegistration) verifySuper(ctx context.Context) error {
if !service.AdminMember().VerifySuperId(ctx, contexts.GetUserId(ctx)) {
if !isImPlatformAdmin(ctx, contexts.GetUserId(ctx)) {
return gerror.New("仅平台超级管理员可操作IM注册配置")
}
return nil