You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following simple test fails, and actually changes the underlying grant model.
it('Check with multiple roles changes grant list', function () {
var ac = new AccessControl(grantList);
// Admin can update any video
expect(ac.can(['admin']).updateAny('video').granted).toEqual(true);
// console.log('grants', ac.getGrants());
// This check actually changes the underlying grants
ac.can(['user', 'admin']).updateOwn('video');
// console.log('grants', ac.getGrants());
// Admin can update any video (nope not anymore!)
expect(ac.can(['admin']).updateAny('video').granted).toEqual(true);
});
The text was updated successfully, but these errors were encountered:
The following simple test fails, and actually changes the underlying grant model.
The text was updated successfully, but these errors were encountered: