-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[demo][acl] Apply multiple ACLs for a single object #226
Labels
Comments
Ad-hoc method of application of ACLs for properties copied from globals const acl = {
DummyContainer: {
[S_OBJECT]: {
[S_DEFAULT]: 'r--',
'@normalization_checker': 'rwxRW',
},
[S_DEFAULT]: '---',
navigator: {
[S_DEFAULT]: function _copiedNavigatorAcl(normalizedThisArg,
normalizedArgs /* ['property', args], ['property', value], etc. */,
aclArgs /* [name, isStatic, isObject, property, opType, context] */,
hookArgs /* [f, thisArg, args, context, newTarget] */,
applyAcl /* for recursive application of ACL */) {
// TODO: automate and force this process
let opType = aclArgs[4];
let target;
if (opType === 'r') {
Policy.trackClass('DummyContainer.navigator', normalizedThisArg[normalizedArgs[0]]);
return true;
}
return false;
},
language: {
[S_DEFAULT]: 'r--',
'@normalization_checker': '---',
},
},
},
'DummyContainer.navigator': {
[S_DEFAULT]: 'r--', // avoid redundant calls of Policy.trackClass('DummyContainer.navigator', target)
[S_CHAIN]: () => acl.DummyContainer.navigator,
},
} // multipath
window.DummyContainer = { navigator: navigator };
DummyContainer.navigator.serviceWorker; // acl.navigator.serviceWorker is applied to DummyContainer.navigator
DummyContainer.navigator.language; // acl.DummyContainer.navigator.language is applied to DummyContainer.navigator
navigator.language; // acl.DummyContainer.navigator.language is applied to global navigator |
t2ym
added a commit
that referenced
this issue
Mar 5, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[demo][acl] Apply multiple ACLs for a single object
Example ACLs
acl.navigator
andacl.clientInformation
fornavigator
objectImplementation
_globalObjects.get(obj)
returns aSet
object containing object namesapplyAcl()
can be either aSet
object or astring
_blacklistObjects
is deprecated_globalObjectsGet()
function for mitigating [demo][hook-callback][Chrome Canary 63.0.3239.0] Map.get() is very slow #155 is deprecatedname
property of POSTederrorReport.json
object is'name1 name2 ... nameN'
delimited by spaceserrorReport.json
object can be freely customized to meet the needsThe text was updated successfully, but these errors were encountered: