From 6613feb6ba1c5e160d5dcace171563febc7abcfc Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sun, 3 Jul 2016 19:43:37 +0300 Subject: [PATCH] Also include the command instance when checking invoker authority with script callbacks. --- source/Command.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Command.hpp b/source/Command.hpp index 5a521ee1..8d65928c 100644 --- a/source/Command.hpp +++ b/source/Command.hpp @@ -1645,7 +1645,7 @@ public: else if (!m_OnAuth.IsNull()) { // 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 return !ret ? false : *ret; } @@ -1653,7 +1653,7 @@ public: else if (!m_Controller.Expired() && !m_Controller.Lock()->GetOnAuth().IsNull()) { // 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 return !ret ? false : *ret; }