From 38dba11e44d6fcd3b24e78a935c9465f3f3c6b5f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 4 Jan 2015 23:33:17 -0800 Subject: [PATCH] GUAC-986: Initialize object permission types of PermissionFlagSet. --- .../app/rest/types/PermissionFlagSet.js | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/guacamole/src/main/webapp/app/rest/types/PermissionFlagSet.js b/guacamole/src/main/webapp/app/rest/types/PermissionFlagSet.js index 197752379..876f6bb20 100644 --- a/guacamole/src/main/webapp/app/rest/types/PermissionFlagSet.js +++ b/guacamole/src/main/webapp/app/rest/types/PermissionFlagSet.js @@ -64,7 +64,12 @@ angular.module('rest').factory('PermissionFlagSet', ['PermissionSet', * * @type Object.> */ - this.connectionPermissions = template.connectionPermissions || {}; + this.connectionPermissions = template.connectionPermissions || { + 'READ' : {}, + 'UPDATE' : {}, + 'DELETE' : {}, + 'ADMINISTER' : {} + }; /** * The granted state of each permission for each connection group, as a @@ -78,7 +83,12 @@ angular.module('rest').factory('PermissionFlagSet', ['PermissionSet', * * @type Object.> */ - this.connectionGroupPermissions = template.connectionGroupPermissions || {}; + this.connectionGroupPermissions = template.connectionGroupPermissions || { + 'READ' : {}, + 'UPDATE' : {}, + 'DELETE' : {}, + 'ADMINISTER' : {} + }; /** * The granted state of each permission for each user, as a map of @@ -91,7 +101,12 @@ angular.module('rest').factory('PermissionFlagSet', ['PermissionSet', * * @type Object.> */ - this.userPermissions = template.userPermissions || {}; + this.userPermissions = template.userPermissions || { + 'READ' : {}, + 'UPDATE' : {}, + 'DELETE' : {}, + 'ADMINISTER' : {} + }; };