diff --git a/dispatchers/attributes.go b/dispatchers/attributes.go index 40b295ec1..bf50f3e8a 100755 --- a/dispatchers/attributes.go +++ b/dispatchers/attributes.go @@ -32,10 +32,13 @@ func (dS *DispatcherService) AttributeSv1Ping(ign string, reply *string) error { func (dS *DispatcherService) AttributeSv1GetAttributeForEvent(args *ArgsAttrProcessEventWithApiKey, reply *engine.AttributeProfile) (err error) { - //if err = dS.authorize(utils.AttributeSv1GetAttributeForEvent, args.AttrArgsProcessEvent.CGREvent.Tenant, - // args.APIKey, args.AttrArgsProcessEvent.CGREvent.Time); err != nil { - // return - //} + if dS.attrS != nil { + if err = dS.authorize(utils.AttributeSv1GetAttributeForEvent, + args.AttrArgsProcessEvent.CGREvent.Tenant, + args.APIKey, args.AttrArgsProcessEvent.CGREvent.Time); err != nil { + return + } + } return dS.Dispatch(&args.CGREvent, utils.MetaAttributes, utils.AttributeSv1GetAttributeForEvent, args.AttrArgsProcessEvent, reply)