Commit e9b2ab15 authored by Hugo Roenick's avatar Hugo Roenick
Browse files

Commit final do item [OPENBUS-2481]: Permitir que operacoes de getEntityLogins...

Commit final do item [OPENBUS-2481]: Permitir que operacoes de getEntityLogins e invalidateLogin seja realizado pela mesma entidade cuja informacao deseja-se manipular



git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/core/branches/02_00_00@150706 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 75c6c69e
local idl = require "openbus.core.idl"
local UnauthorizedOperation = idl.throw.services.UnauthorizedOperation
local module = {}
function module.assertCaller(self, owner)
local entity = self.access:getCallerChain().caller.entity
local logtag
if entity == owner then
logtag = "request"
elseif self.admins[entity] ~= nil then
logtag = "admin"
else
UnauthorizedOperation()
end
return logtag
end
return module
\ No newline at end of file
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