GUACAMOLE-220: Include the identifier of the associated object within ManagementPermissions.

This commit is contained in:
Michael Jumper
2018-05-01 16:39:02 -07:00
parent 708c255b83
commit 1989c11dd9

View File

@@ -37,6 +37,14 @@ angular.module('manage').factory('ManagementPermissions', ['$injector',
*/
var ManagementPermissions = function ManagementPermissions(template) {
/**
* The identifier of the associated object, or null if the object does
* not yet exist.
*
* @type String
*/
this.identifier = template.identifier || null;
/**
* Whether the user can save the associated object. This could be
* updating an existing object, or creating a new object.
@@ -129,6 +137,8 @@ angular.module('manage').factory('ManagementPermissions', ['$injector',
return new ManagementPermissions({
identifier : identifier,
// A user can save (create or update) an object if they are a
// system-level administrator, OR the object does not yet exist and
// the user has explicit permission to create such objects, OR the