优化接口权限

This commit is contained in:
刘祥超
2022-09-17 16:07:37 +08:00
parent 55eecce416
commit 1d1ff11eb7
54 changed files with 275 additions and 246 deletions

View File

@@ -16,7 +16,7 @@ type LoginService struct {
// FindEnabledLogin 查找认证
func (this *LoginService) FindEnabledLogin(ctx context.Context, req *pb.FindEnabledLoginRequest) (*pb.FindEnabledLoginResponse, error) {
_, userId, err := this.ValidateAdminAndUser(ctx)
_, userId, err := this.ValidateAdminAndUser(ctx, false)
if err != nil {
return nil, err
}
@@ -46,7 +46,7 @@ func (this *LoginService) FindEnabledLogin(ctx context.Context, req *pb.FindEnab
// UpdateLogin 修改认证
func (this *LoginService) UpdateLogin(ctx context.Context, req *pb.UpdateLoginRequest) (*pb.RPCSuccess, error) {
_, userId, err := this.ValidateAdminAndUser(ctx)
_, userId, err := this.ValidateAdminAndUser(ctx, false)
if err != nil {
return nil, err
}