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