diff options
author | hackademix | 2019-09-27 15:33:11 +0200 |
---|---|---|
committer | hackademix | 2019-09-29 17:29:38 +0200 |
commit | 78063f341225b85d68ef45faad5197672d5a01c2 (patch) | |
tree | 5840081585c93f2d078a6a392a08739761b70e66 /src/common | |
parent | c9e06983ba330ab70d2956e7287dde263278128a (diff) | |
download | noscript-78063f341225b85d68ef45faad5197672d5a01c2.tar.gz noscript-78063f341225b85d68ef45faad5197672d5a01c2.tar.xz noscript-78063f341225b85d68ef45faad5197672d5a01c2.zip |
Remove ChildPolicies and its dependencies.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/Policy.js | 10 |
1 files changed, 10 insertions, 0 deletions
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; } |