mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-21 20:27:13 +01:00
Also include the command instance when checking invoker authority with script callbacks.
This commit is contained in:
parent
cfe2d3b4ed
commit
6613feb6ba
@ -1645,7 +1645,7 @@ public:
|
|||||||
else if (!m_OnAuth.IsNull())
|
else if (!m_OnAuth.IsNull())
|
||||||
{
|
{
|
||||||
// Ask the specified authority inspector if this execution should be allowed
|
// Ask the specified authority inspector if this execution should be allowed
|
||||||
const SharedPtr< bool > ret = m_OnAuth.Evaluate< bool, const Object & >(invoker);
|
const SharedPtr< bool > ret = m_OnAuth.Evaluate< bool, const Object &, Listener * >(invoker, this);
|
||||||
// See what the custom authority inspector said or default to disallow
|
// See what the custom authority inspector said or default to disallow
|
||||||
return !ret ? false : *ret;
|
return !ret ? false : *ret;
|
||||||
}
|
}
|
||||||
@ -1653,7 +1653,7 @@ public:
|
|||||||
else if (!m_Controller.Expired() && !m_Controller.Lock()->GetOnAuth().IsNull())
|
else if (!m_Controller.Expired() && !m_Controller.Lock()->GetOnAuth().IsNull())
|
||||||
{
|
{
|
||||||
// Ask the specified authority inspector if this execution should be allowed
|
// Ask the specified authority inspector if this execution should be allowed
|
||||||
const SharedPtr< bool > ret = m_Controller.Lock()->GetOnAuth().Evaluate< bool, const Object & >(invoker);
|
const SharedPtr< bool > ret = m_Controller.Lock()->GetOnAuth().Evaluate< bool, const Object &, Listener * >(invoker, this);
|
||||||
// See what the custom authority inspector said or default to disallow
|
// See what the custom authority inspector said or default to disallow
|
||||||
return !ret ? false : *ret;
|
return !ret ? false : *ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user