mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-10 04:20:26 +08:00
优化接口权限
This commit is contained in:
@@ -13,7 +13,7 @@ type SysLockerService struct {
|
||||
|
||||
// SysLockerLock 获得锁
|
||||
func (this *SysLockerService) SysLockerLock(ctx context.Context, req *pb.SysLockerLockRequest) (*pb.SysLockerLockResponse, error) {
|
||||
_, userId, err := this.ValidateAdminAndUser(ctx)
|
||||
_, userId, err := this.ValidateAdminAndUser(ctx, false)
|
||||
if err != nil {
|
||||
_, err = this.ValidateMonitorNode(ctx)
|
||||
if err != nil {
|
||||
@@ -43,7 +43,7 @@ func (this *SysLockerService) SysLockerLock(ctx context.Context, req *pb.SysLock
|
||||
|
||||
// SysLockerUnlock 释放锁
|
||||
func (this *SysLockerService) SysLockerUnlock(ctx context.Context, req *pb.SysLockerUnlockRequest) (*pb.RPCSuccess, error) {
|
||||
_, userId, err := this.ValidateAdminAndUser(ctx)
|
||||
_, userId, err := this.ValidateAdminAndUser(ctx, false)
|
||||
if err != nil {
|
||||
_, err = this.ValidateMonitorNode(ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user