[用户节点]可以管理用户节点

This commit is contained in:
GoEdgeLab
2020-12-14 21:25:11 +08:00
parent 641df4ccc5
commit c05d060aa1
16 changed files with 749 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ type SysSettingService struct {
// 更改配置
func (this *SysSettingService) UpdateSysSetting(ctx context.Context, req *pb.UpdateSysSettingRequest) (*pb.RPCSuccess, error) {
// 校验请求
_, _, err := rpcutils.ValidateRequest(ctx, rpcutils.UserTypeAdmin)
_, _, err := rpcutils.ValidateRequest(ctx, rpcutils.UserTypeAdmin, rpcutils.UserTypeUser)
if err != nil {
return nil, err
}
@@ -30,7 +30,7 @@ func (this *SysSettingService) UpdateSysSetting(ctx context.Context, req *pb.Upd
// 读取配置
func (this *SysSettingService) ReadSysSetting(ctx context.Context, req *pb.ReadSysSettingRequest) (*pb.ReadSysSettingResponse, error) {
// 校验请求
_, _, err := rpcutils.ValidateRequest(ctx, rpcutils.UserTypeAdmin)
_, _, err := rpcutils.ValidateRequest(ctx, rpcutils.UserTypeAdmin, rpcutils.UserTypeUser)
if err != nil {
return nil, err
}