parent
0b315964d3
commit
ed0b568542
|
@ -14,10 +14,13 @@ function checkResult(err, result) {
|
|||
assert(!err);
|
||||
}
|
||||
|
||||
describe('security scopes', function () {
|
||||
var ds = null;
|
||||
before(function() {
|
||||
ds = loopback.createDataSource({connector: loopback.Memory});
|
||||
});
|
||||
|
||||
describe('security scopes', function () {
|
||||
beforeEach(function() {
|
||||
var ds = this.ds = loopback.createDataSource({connector: loopback.Memory});
|
||||
testModel = loopback.Model.extend('testModel');
|
||||
ACL.attachTo(ds);
|
||||
Role.attachTo(ds);
|
||||
|
@ -156,7 +159,6 @@ describe('security ACLs', function () {
|
|||
});
|
||||
|
||||
it("should honor defaultPermission from the model", function () {
|
||||
var ds = this.ds;
|
||||
var Customer = ds.createModel('Customer', {
|
||||
name: {
|
||||
type: String,
|
||||
|
@ -188,7 +190,6 @@ describe('security ACLs', function () {
|
|||
});
|
||||
|
||||
it("should honor static ACLs from the model", function () {
|
||||
var ds = this.ds;
|
||||
var Customer = ds.createModel('Customer', {
|
||||
name: {
|
||||
type: String,
|
||||
|
@ -226,7 +227,6 @@ describe('security ACLs', function () {
|
|||
it("should check access against LDL, ACL, and Role", function () {
|
||||
// var log = console.log;
|
||||
var log = function() {};
|
||||
var ds = this.ds;
|
||||
|
||||
// Create
|
||||
User.create({name: 'Raymond', email: 'x@y.com', password: 'foobar'}, function (err, user) {
|
||||
|
|
Loading…
Reference in New Issue