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 3227548c6e15bb92108b2b42a15a5b223885b726..10f4415b8cbdd2f9ff716bbdda860331a2833bc2 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 @@ -65,6 +65,7 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp this.ExternalDmsDeletionOptions = dtos.ExternalDmsDeletionOptions; this.TagDeletionOptions = dtos.TagDeletionOptions; this.AuthorizationGroupDeletionOptions = dtos.AuthorizationGroupDeletionOptions; + this.RoleAssignmentDeletionOptions = dtos.RoleAssignmentDeletionOptions; this.SemanticAnnotationDeletionOptions = dtos.SemanticAnnotationDeletionOptions; this.PersonPermId = dtos.PersonPermId; this.EntityTypePermId = dtos.EntityTypePermId; @@ -239,6 +240,7 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp this.DeleteVocabularyTermsOperation = dtos.DeleteVocabularyTermsOperation; this.DeleteTagsOperation = dtos.DeleteTagsOperation; this.DeleteAuthorizationGroupsOperation = dtos.DeleteAuthorizationGroupsOperation; + this.DeleteRoleAssignmentsOperation = dtos.DeleteRoleAssignmentsOperation; this.DeleteOperationExecutionsOperation = dtos.DeleteOperationExecutionsOperation; this.DeleteSemanticAnnotationsOperation = dtos.DeleteSemanticAnnotationsOperation; @@ -573,6 +575,13 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp }); }.bind(this); + this.findRoleAssignment = function(facade, id) { + var c = this; + return facade.getRoleAssignments([ id ], c.createRoleAssignmentFetchOptions()).then(function(tags) { + return tags[id]; + }); + }.bind(this); + this.findSemanticAnnotation = function(facade, id) { var c = this; return facade.getSemanticAnnotations([ id ], c.createSemanticAnnotationFetchOptions()).then(function(annotations) { @@ -672,6 +681,13 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp return facade.deleteAuthorizationGroups([ id ], options); }.bind(this); + this.deleteRoleAssignment = function(facade, id) { + var c = this; + var options = new dtos.RoleAssignmentDeletionOptions(); + options.setReason("test reason"); + return facade.deleteRoleAssignments([ id ], options); + }.bind(this); + this.deleteOperationExecution = function(facade, id) { var c = this; var options = new dtos.OperationExecutionDeletionOptions(); 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 7c9936d937d2bcd420bb2f2e428d32f8d0fd6e50..56ec829b9841c37a8b14bbee4ec6eafce562719f 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 @@ -421,6 +421,9 @@ var sources = [ 'as/dto/roleassignment/create/RoleAssignmentCreation', 'as/dto/roleassignment/create/CreateRoleAssignmentsOperation', 'as/dto/roleassignment/create/CreateRoleAssignmentsOperationResult', + 'as/dto/roleassignment/delete/RoleAssignmentDeletionOptions', + 'as/dto/roleassignment/delete/DeleteRoleAssignmentsOperation', + 'as/dto/roleassignment/delete/DeleteRoleAssignmentsOperationResult', 'as/dto/roleassignment/fetchoptions/RoleAssignmentFetchOptions', 'as/dto/roleassignment/fetchoptions/RoleAssignmentSortOptions', 'as/dto/roleassignment/get/GetRoleAssignmentsOperation', diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js index 77937c97d069e5c5a41576d5d0980ade377c87c0..982075fc6a80b28dcf123173dbd7a832c3dc2c2a 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js @@ -381,6 +381,10 @@ define([ 'jquery', 'openbis', 'test/common' ], function($, openbis, common) { return this._executeDeleteOperation(new c.DeleteAuthorizationGroupsOperation(ids, deletionOptions)); } + this.deleteRoleAssignments = function(ids, deletionOptions) { + return this._executeDeleteOperation(new c.DeleteRoleAssignmentsOperation(ids, deletionOptions)); + } + this.deleteOperationExecutions = function(ids, deletionOptions) { return this._executeDeleteOperation(new c.DeleteOperationExecutionsOperation(ids, deletionOptions)); } diff --git a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-delete.js b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-delete.js index b5f2c00e641cf8566fbc37cb7f347ac70600b526..5ef07657d0313d4b52146f7316810a88f1d715ba 100644 --- a/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-delete.js +++ b/js-test/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-delete.js @@ -195,6 +195,11 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' testDeleteWithoutTrash(c, c.createAuthorizationGroup, c.findAuthorizationGroup, c.deleteAuthorizationGroup); }); + QUnit.test("deleteRoleAssignments()", function(assert) { + var c = new common(assert, openbis); + testDeleteWithoutTrash(c, c.createRoleAssignment, c.findRoleAssignment, c.deleteRoleAssignment); + }); + QUnit.test("deleteOperationExecutions()", function(assert) { var c = new common(assert, openbis);