mirror of https://github.com/Icinga/icinga2.git
Merge pull request #7113 from Elias481/fix/incorrect-usage-of-global-namespace-6874-6785
use dedicated permissions namespace for scriptframe in filterutility
This commit is contained in:
commit
ecbfdc2732
|
@ -23,7 +23,8 @@ bool EventQueue::CanProcessEvent(const String& type) const
|
|||
|
||||
void EventQueue::ProcessEvent(const Dictionary::Ptr& event)
|
||||
{
|
||||
ScriptFrame frame(true);
|
||||
Namespace::Ptr frameNS = new Namespace();
|
||||
ScriptFrame frame(true, frameNS);
|
||||
frame.Sandboxed = true;
|
||||
|
||||
try {
|
||||
|
|
|
@ -188,7 +188,8 @@ std::vector<Value> FilterUtility::GetFilterTargets(const QueryDescription& qd, c
|
|||
Expression *permissionFilter;
|
||||
CheckPermission(user, qd.Permission, &permissionFilter);
|
||||
|
||||
ScriptFrame permissionFrame(true);
|
||||
Namespace::Ptr permissionFrameNS = new Namespace();
|
||||
ScriptFrame permissionFrame(true, permissionFrameNS);
|
||||
|
||||
for (const String& type : qd.Types) {
|
||||
String attr = type;
|
||||
|
|
Loading…
Reference in New Issue