ngin_client
Advanced tools
Comparing version 0.2.49 to 0.2.50
{ | ||
"name": "ngin_client", | ||
"version": "0.2.49", | ||
"version": "0.2.50", | ||
"description": "Node client for interacting with the NGIN API services", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
@@ -63,3 +63,3 @@ var Url = require('url') | ||
permissions: function(options, callback) { | ||
roleAssignments: function(options, callback) { | ||
if (typeof options === 'function') { | ||
@@ -69,4 +69,4 @@ callback = options, options = {} | ||
options || (options = {}) | ||
var url = Persona.urlRoot() + '/' + this.id + '/permissions' | ||
return ngin.Permission.list(_.extend({}, options, {url:url}), callback) | ||
var url = Persona.urlRoot() + '/' + this.id + '/role_assignments' | ||
return ngin.RoleAssignment.list(_.extend({}, options, {url:url}), callback) | ||
}, | ||
@@ -80,3 +80,3 @@ | ||
var url = Persona.urlRoot() + '/' + this.id + '/groups' | ||
return ngin.Permission.list(_.extend({}, options, {url:url}), callback) | ||
return ngin.RoleAssignment.list(_.extend({}, options, {url:url}), callback) | ||
}, | ||
@@ -83,0 +83,0 @@ |
@@ -37,7 +37,7 @@ "use strict" | ||
var attr = Super.parse.call(this, attr) | ||
return _.extend({}, attr.user, { permissions: attr.permissions }) | ||
return _.extend({}, attr.user) | ||
}, | ||
isThirdNorth: function() { | ||
return this.permissions && this.permissions.some(isThirdNorth) | ||
return this.role_assignments && this.role_assignments.some(isThirdNorth) | ||
}, | ||
@@ -44,0 +44,0 @@ |
101456