mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-10 12:10:26 +08:00
优化接口权限
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user