Skip to content

Commit

Permalink
fixed boolean issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jspears committed Apr 23, 2012
1 parent 7d78691 commit b76e7a8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions plugins/passport/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ PassportPlugin.prototype.onAuth = function (req, res) {
}
PassportPlugin.prototype.filters = function () {
var passfield = this.options.passwordField || 'password';
var authenticate = passport.authenticate('local', { failureRedirect:this.pluginUrl+'/check' });
var authenticate = passport.authenticate('local', { failureRedirect:this.pluginUrl + '/check' });
var app = this.app;
app.post(this.pluginUrl, this.encryptCredentials.bind(this), authenticate, this.onAuth.bind(this));
app.post(this.pluginUrl, this.encryptCredentials.bind(this), authenticate, this.onAuth.bind(this));

app.get(this.pluginUrl + '/check', this.ensureAuthenticated.bind(this), this.onAuth.bind(this));

Expand All @@ -72,7 +72,10 @@ PassportPlugin.prototype.filters = function () {
app.all(this.baseUrl + '*', function (req, res, next) {
if (req.authrequired) {
if (req.body[passfield])
return authenticate(req, res, next);
this.encryptCredentials(req, res, function (err) {
if (err) return next(err);
return authenticate(req, res, next);
})
}
next();

Expand Down
2 changes: 1 addition & 1 deletion plugins/static/public/js/libs/bobamo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ define([
var save = this.form.getValue();
//handle nested objects.
_(save).each(function (v, k) {
if (_.isEmpty(v))
if (_.isString(v) && _.isEmpty(v))
v = null;

if (k && k.indexOf('.') > -1) {
Expand Down
1 change: 1 addition & 0 deletions plugins/static/public/js/libs/table/jquery.sorter.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

.sorter .arrow.up {
border-bottom: 4px solid black;
margin: 0 0 1px 0;
}

.sorter .arrow.activate {
Expand Down

0 comments on commit b76e7a8

Please sign in to comment.