mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-22 06:20:25 +08:00
优化接口权限
This commit is contained in:
@@ -91,7 +91,7 @@ func (this *HTTPLocationService) DeleteHTTPLocation(ctx context.Context, req *pb
|
||||
// FindAndInitHTTPLocationReverseProxyConfig 查找反向代理设置
|
||||
func (this *HTTPLocationService) FindAndInitHTTPLocationReverseProxyConfig(ctx context.Context, req *pb.FindAndInitHTTPLocationReverseProxyConfigRequest) (*pb.FindAndInitHTTPLocationReverseProxyConfigResponse, error) {
|
||||
// 校验请求
|
||||
adminId, userId, err := this.ValidateAdminAndUser(ctx)
|
||||
adminId, userId, err := this.ValidateAdminAndUser(ctx, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -144,7 +144,7 @@ func (this *HTTPLocationService) FindAndInitHTTPLocationReverseProxyConfig(ctx c
|
||||
// FindAndInitHTTPLocationWebConfig 初始化Web设置
|
||||
func (this *HTTPLocationService) FindAndInitHTTPLocationWebConfig(ctx context.Context, req *pb.FindAndInitHTTPLocationWebConfigRequest) (*pb.FindAndInitHTTPLocationWebConfigResponse, error) {
|
||||
// 校验请求
|
||||
adminId, userId, err := this.ValidateAdminAndUser(ctx)
|
||||
adminId, userId, err := this.ValidateAdminAndUser(ctx, true)
|
||||
if err != nil {
|
||||
return nil, rpcutils.Wrap("ValidateRequest()", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user