From 78063f341225b85d68ef45faad5197672d5a01c2 Mon Sep 17 00:00:00 2001 From: hackademix Date: Fri, 27 Sep 2019 15:33:11 +0200 Subject: Remove ChildPolicies and its dependencies. --- src/common/Policy.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/common') diff --git a/src/common/Policy.js b/src/common/Policy.js index d67c24f..674263a 100644 --- a/src/common/Policy.js +++ b/src/common/Policy.js @@ -451,6 +451,16 @@ var {Permissions, Policy, Sites} = (() => { return JSON.stringify(this.dry(true)); } + cascadeRestrictions(perms, topUrl) { + let topPerms = ns.policy.get(topUrl, topUrl).perms; + if (topPerms !== perms) { + let topCaps = topPerms.capabilities; + perms = new Permissions([...perms.capabilities].filter(c => topCaps.has(c)), + perms.temp, perms.contextual); + } + return perms; + } + equals(other) { this.snapshot === other.snapshot; } -- cgit v1.2.3