public/js/models/policyRecord.js in conjur-asset-ui-1.3.0 vs public/js/models/policyRecord.js in conjur-asset-ui-1.3.1
- old
+ new
@@ -1,5 +1,7 @@
+/* global conjur, async */
+
(function(conjur, async, errback) {
'use strict';
var Generic = this.Generic;
@@ -16,24 +18,21 @@
};
Policy.prototype = Object.create(Generic.prototype);
Policy.prototype.constructor = Policy;
- Policy.prototype.fetch = function(callback, custom_errback) {
- var self = this,
- id = this.id;
-
- if (typeof(custom_errback) == 'undefined') {
- custom_errback = errback; // reset to default
+ Policy.prototype.fetch = function(callback, customErrback) {
+ if (typeof(customErrback) === 'undefined') {
+ customErrback = errback; // reset to default
}
async.parallel([
this.resource.bind(this),
this.ownedResources.bind(this),
this.allRoles.bind(this)
], function(err, results) {
if (err) {
- return custom_errback(err.status);
+ return customErrback(err.status);
}
callback({
policy: results[0],
owned: results[1],