Remove the empty comment and set default token

This commit is contained in:
Raymond Feng 2013-12-11 16:21:37 -08:00
parent 97dc0aa441
commit 0f86f69880
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,5 @@
var loopback = require('../loopback');
var AccessToken = require('./access-token');
/**
* Access context represents the context for a request to access protected
@ -24,7 +25,6 @@ function AccessContext(context) {
}
context = context || {};
//
this.principals = context.principals || [];
var model = context.model;
model = ('string' === typeof model) ? loopback.getModel(model) : model;
@ -37,7 +37,7 @@ function AccessContext(context) {
this.method = context.method;
this.accessType = context.accessType || AccessContext.ALL;
this.accessToken = context.accessToken;
this.accessToken = context.accessToken || AccessToken.ANONYMOUS;
var principalType = context.principalType || Principal.USER;
var principalId = context.principalId || undefined;