Sha256: 2d574cecd47a7ff21c0c446b722960a75099dd725b07c4f840dd4226a4b7428a

Contents?: true

Size: 698 Bytes

Versions: 1

Compression:

Stored size: 698 Bytes

Contents

if (typeof $ === "undefined") { throw new Error("jQuery is required") }

Record.User = function(args) {
  var superArguments = Array.prototype.slice.call(arguments);
  superArguments.unshift("user");
  Record.Generic.apply(this, superArguments);
}

Record.User.prototype = Object.create(Record.Generic.prototype);
Record.User.prototype.constructor = Record.User;

Record.User.prototype.fetch = function(callback) {
  var self = this;
  var id = this.id;

  async.parallel([
      this.attributes.bind(this),
      this.ownedResources.bind(this)
    ],
    function(err, results) {
      if ( err ) 
        return errback(err);
      
      callback({user: results[0], owned: results[1]});
  });
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
conjur-asset-ui-api-1.2.0 public/js/models/userRecord.js