// Unenforce stops enforcing policy for the given contextID.
194856
func (s *ProxyInfo) Unenforce(contextID string) error {

	request := &rpcwrapper.Request{
		Payload: &rpcwrapper.UnEnforcePayload{
			ContextID: contextID,
		},
	}

	if err := s.rpchdl.RemoteCall(contextID, remoteenforcer.Unenforce, request, &rpcwrapper.Response{}); err != nil {
		zap.L().Error("failed to send message to remote enforcer", zap.Error(err))
	}

	return s.prochdl.KillRemoteEnforcer(contextID, true)
}
122942
func mustEnforce(contextID string, containerInfo *policy.PUInfo) bool {

	if containerInfo.Policy.TriremeAction() == policy.AllowAll {
		zap.L().Debug("PUPolicy with AllowAll Action. Not policing", zap.String("contextID", contextID))
		return false
	}

	return true
}
1142459
func (e *OrderEnforcer) OnEnforce(reqProp *property.PhysicalProperty, child memo.Implementation) (impl memo.Implementation) {
	sort := &plannercore.PhysicalSort{
		ByItems: make([]*plannercore.ByItems, 0, len(reqProp.Items)),
	}
	for _, item := range reqProp.Items {
		item := &plannercore.ByItems{
			Expr: item.Col,
			Desc: item.Desc,
		}
		sort.ByItems = append(sort.ByItems, item)
	}
	sort.SetChildren(child.GetPlan())
	impl = implementation.NewSortImpl(sort)
	return
}
679035
func (e *CachedEnforcer) Enforce(rvals ...interface{}) bool {
	if !e.enableCache {
		return e.Enforcer.Enforce(rvals...)
	}

	key := ""
	for _, rval := range rvals {
		if val, ok := rval.(string); ok {
			key += val + "$$"
		} else {
			return e.Enforcer.Enforce(rvals...)
		}
	}

	e.locker.Lock()
	defer e.locker.Unlock()
	if _, ok := e.m[key]; ok {
		return e.m[key]
	} else {
		res := e.Enforcer.Enforce(rvals...)
		e.m[key] = res
		return res
	}
}
1158732
func (q *ParentIdQuery) IgnoreUnmapped(ignore bool) *ParentIdQuery {
	q.ignoreUnmapped = &ignore
	return q
}
1331657
func (c *Tethering) Unbind(port int) (*gcdmessage.ChromeResponse, error) {
	var v TetheringUnbindParams
	v.Port = port
	return c.UnbindWithParams(&v)
}
1330011
func (w *WebHookPayload) GetForced() bool {
	if w == nil || w.Forced == nil {
		return false
	}
	return *w.Forced
}
897503
func (s *SecretsProxy) Enforce(puInfo *policy.PUInfo) error {
	return s.updateService(puInfo)
}
92326
func (c *Client) Unexport(
	ctx context.Context, name string) error {

	ok, id, err := c.IsExported(ctx, name)
	if err != nil {
		return err
	}
	if !ok {
		return nil
	}
	return c.UnexportByID(ctx, id)
}
134850
func (oc *OpCommon) AddUnrefBlock(ptr data.BlockPointer) {
	oc.UnrefBlocks = append(oc.UnrefBlocks, ptr)
}
935882
func (api *Client) UnarchiveChannel(channelID string) error {
	return api.UnarchiveChannelContext(context.Background(), channelID)
}
1295770
func (p *Provisioner) StopContext() context.Context {
	p.stopOnce.Do(p.stopInit)
	return p.stopCtx
}
1291174
func (e *SyncedEnforcer) RemoveFilteredPolicy(fieldIndex int, fieldValues ...string) bool {
	e.m.Lock()
	defer e.m.Unlock()
	return e.Enforcer.RemoveFilteredPolicy(fieldIndex, fieldValues...)
}
837729
func (s *RemoteEnforcer) EnforcerExit(req rpcwrapper.Request, resp *rpcwrapper.Response) error {

	s.cleanup()

	s.exit <- true

	return nil
}
33768
func (p *PreReceiveHook) GetEnforcement() string {
	if p == nil || p.Enforcement == nil {
		return ""
	}
	return *p.Enforcement
}
1365123
func WithForce(ctx context.Context, force bool) context.Context {
	return context.WithValue(ctx, ctxKeyForce, force)
}
648553
func (e *Enforcer) Enforce(rvals ...interface{}) bool {
	return enforce(e.Enforcer, e.defaultRole, e.claimsEnforcerFunc, rvals...)
}