Bug 1197420 Part 4 Apply dynamic permission changes r=kmag

MozReview-Commit-ID: 6TdcUv1fHPh
This commit is contained in:
Andrew Swan
2017-03-23 17:28:52 -07:00
parent 1ab93c4095
commit 43dbe20442
7 changed files with 135 additions and 15 deletions

View File

@@ -689,8 +689,11 @@ class SchemaAPIManager extends EventEmitter {
}
}
function hasPermission(perm) {
return context.extension.hasPermission(perm, true);
}
for (let api of apis) {
if (Schemas.checkPermissions(api.namespace, context.extension)) {
if (Schemas.checkPermissions(api.namespace, {hasPermission})) {
api = api.getAPI(context);
copy(obj, api);
}