Revision 5d9ac244 snf-cyclades-app/synnefo/ui/static/snf/js/models.js
b/snf-cyclades-app/synnefo/ui/static/snf/js/models.js | ||
---|---|---|
328 | 328 |
if (username != 'root') { |
329 | 329 |
prepend = '/home' |
330 | 330 |
} |
331 |
return '{1}/{0}/.ssh/authorized_keys'.format(username, |
|
332 |
prepend); |
|
331 |
return {'user': username, 'path': '{1}/{0}/.ssh/authorized_keys'.format(username,
|
|
332 |
prepend)};
|
|
333 | 333 |
}); |
334 | 334 |
}, |
335 | 335 |
|
... | ... | |
351 | 351 |
}, |
352 | 352 |
|
353 | 353 |
personality_data_for_keys: function(keys) { |
354 |
return _.map(this.ssh_keys_paths(), function(path) { |
|
354 |
return _.map(this.ssh_keys_paths(), function(pathinfo) {
|
|
355 | 355 |
var contents = ''; |
356 | 356 |
_.each(keys, function(key){ |
357 | 357 |
contents = contents + key.get("content") + "\n" |
... | ... | |
359 | 359 |
contents = $.base64.encode(contents); |
360 | 360 |
|
361 | 361 |
return { |
362 |
path: path, |
|
363 |
contents: contents |
|
362 |
path: pathinfo.path, |
|
363 |
contents: contents, |
|
364 |
mode: 0600, |
|
365 |
owner: pathinfo.user, |
|
366 |
group: pathinfo.user |
|
364 | 367 |
} |
365 | 368 |
}); |
366 | 369 |
} |
Also available in: Unified diff