diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js index 80df931da45dd206b4098670ff3fccfb08ce397a..1038ca835aa09e234a67b6096f43092b68a02868 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js @@ -70,6 +70,7 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp this.RoleAssignmentDeletionOptions = dtos.RoleAssignmentDeletionOptions; this.SemanticAnnotationDeletionOptions = dtos.SemanticAnnotationDeletionOptions; this.PersonPermId = dtos.PersonPermId; + this.Me = dtos.Me; this.EntityTypePermId = dtos.EntityTypePermId; this.SpacePermId = dtos.SpacePermId; this.ProjectPermId = dtos.ProjectPermId; @@ -587,15 +588,15 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp this.findAuthorizationGroup = function(facade, id) { var c = this; - return facade.getAuthorizationGroups([ id ], c.createAuthorizationGroupFetchOptions()).then(function(tags) { - return tags[id]; + return facade.getAuthorizationGroups([ id ], c.createAuthorizationGroupFetchOptions()).then(function(groups) { + return groups[id]; }); }.bind(this); this.findRoleAssignment = function(facade, id) { var c = this; - return facade.getRoleAssignments([ id ], c.createRoleAssignmentFetchOptions()).then(function(tags) { - return tags[id]; + return facade.getRoleAssignments([ id ], c.createRoleAssignmentFetchOptions()).then(function(assignments) { + return assignments[id]; }); }.bind(this); diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/dtos.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/dtos.js index 5ce29c77534160b3510251782352cbd7967855ed..a6a16e17766be743be53431bcf8fb3b8f7327bb8 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/dtos.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/dtos.js @@ -374,6 +374,7 @@ var sources = [ 'as/dto/person/create/CreatePersonsOperationResult', 'as/dto/person/get/GetPersonsOperation', 'as/dto/person/get/GetPersonsOperationResult', + 'as/dto/person/id/Me', 'as/dto/person/id/PersonPermId', 'as/dto/person/search/EmailSearchCriteria', 'as/dto/person/search/FirstNameSearchCriteria', diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js index d711db51e35bb74e91b9b3bf669c90978965e3ef..d19587f18def394c4ced0cb8a951b7fa88887bc2 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-update.js @@ -542,13 +542,18 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' update.setAuthorizationGroupId(permId); update.setDescription(description); update.getUserIds().remove([new c.PersonPermId("power_user")]); - update.getUserIds().add([new c.PersonPermId("admin")]); + update.getUserIds().add([new c.PersonPermId("admin"), new c.Me()]); return facade.updateAuthorizationGroups([ update ]); } var fCheck = function(group) { c.assertEqual(group.getCode(), code, "Code"); c.assertEqual(group.getDescription(), description, "Description"); + var users = $.map(group.getUsers(), function(user) { + return user.getUserId(); + }); + users.sort(); + c.assertEqual(users.toString(), "admin,openbis_test_js", "Users"); } testUpdate(c, fCreate, fUpdate, c.findAuthorizationGroup, fCheck);