diff options
Diffstat (limited to 'indra/newview/llcommandhandler.cpp')
| -rw-r--r-- | indra/newview/llcommandhandler.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp index 4038ae8002..1ccf578118 100644 --- a/indra/newview/llcommandhandler.cpp +++ b/indra/newview/llcommandhandler.cpp @@ -66,6 +66,7 @@ public: LLMediaCtrl* web, const std::string& nav_type, bool trusted_browser); + bool isSensitive(const std::string& cmd) const; private: void notifySlurlBlocked(); @@ -170,6 +171,13 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, return info.mHandler->handle(params, query_map, grid, web); } +bool LLCommandHandlerRegistry::isSensitive(const std::string& cmd) const +{ + std::map<std::string, LLCommandHandlerInfo>::const_iterator it = mMap.find(cmd); + if (it == mMap.end() || !it->second.mHandler) return false; + return it->second.mHandler->isSensitive(); +} + void LLCommandHandlerRegistry::notifySlurlBlocked() { static bool slurl_blocked = false; @@ -231,6 +239,12 @@ bool LLCommandDispatcher::dispatch(const std::string& cmd, cmd, params, query_map, grid, web, nav_type, trusted_browser); } +// static +bool LLCommandDispatcher::isSensitive(const std::string& cmd) +{ + return LLCommandHandlerRegistry::instance().isSensitive(cmd); +} + static std::string lookup(LLCommandHandler::EUntrustedAccess value); LLSD LLCommandDispatcher::enumerate() |
