Commit e0423a38 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia
Browse files

[OPENBUS-2052] Registro de ofertas passa a não ignorar facetas padrão do SCS...

[OPENBUS-2052] Registro de ofertas passa a não ignorar facetas padrão do SCS na obtenção das facetas ofertas por um componente registrado.

git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/core/trunk@133937 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 21c0c855
......@@ -448,16 +448,12 @@ function OfferRegistry:registerService(service_ref, properties)
error = result,
}}
end
local allfacets = result
local facets = {}
for _, facet in ipairs(allfacets) do
local facetname = facet.name
if IgnoredFacets[facetname] == nil then
facets[#facets+1] = {
name = facetname,
interface_name = facet.interface_name,
}
end
for index, facet in ipairs(result) do
facets[index] = {
name = facet.name,
interface_name = facet.interface_name,
}
end
-- get information about the caller
local login = self.access:getCallerChain().caller
......@@ -467,8 +463,11 @@ function OfferRegistry:registerService(service_ref, properties)
local entity = EntityRegistry:getEntity(entityId)
local unauthorized = {}
for _, facet in ipairs(facets) do
if entity==nil or entity.authorized[facet.interface_name]==nil then
unauthorized[#unauthorized+1] = facet.name
local facetname = facet.name
if IgnoredFacets[facetname] == nil
and (entity == nil or entity.authorized[facet.interface_name] == nil)
then
unauthorized[#unauthorized+1] = facetname
end
end
if #unauthorized > 0 then
......@@ -648,12 +647,6 @@ end
-- Faceta EntityRegistry
------------------------------------------------------------------------------
local IgnoredFacets = {
IComponent = true,
IMetaInterface = true,
IReceptacles = true,
}
local Entity = class{ __type = types.RegisteredEntity }
function Entity:__init()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment