2 * This document is a part of the source code and related artifacts
3 * for CollectionSpace, an open source collections management system
4 * for museums and related institutions:
6 * http://www.collectionspace.org
7 * http://wiki.collectionspace.org
9 * Copyright 2010 University of California at Berkeley
11 * Licensed under the Educational Community License (ECL), Version 2.0.
12 * You may not use this file except in compliance with this License.
14 * You may obtain a copy of the ECL 2.0 License at
16 * https://source.collectionspace.org/collection-space/LICENSE.txt
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
25 * To change this template, choose Tools | Templates
26 * and open the template in the editor.
28 package org.collectionspace.services.security.client.test;
30 import java.util.ArrayList;
31 import java.util.Collection;
32 import java.util.Date;
33 import java.util.Hashtable;
34 import java.util.List;
36 import javax.ws.rs.core.Response;
38 import org.collectionspace.services.account.AccountsCommon;
39 import org.collectionspace.services.authorization.AccountRole;
40 import org.collectionspace.services.authorization.AccountValue;
41 import org.collectionspace.services.authorization.perms.ActionType;
42 import org.collectionspace.services.authorization.perms.EffectType;
43 import org.collectionspace.services.authorization.perms.Permission;
44 import org.collectionspace.services.authorization.perms.PermissionAction;
45 import org.collectionspace.services.authorization.PermissionRole;
46 import org.collectionspace.services.authorization.PermissionValue;
47 import org.collectionspace.services.authorization.Role;
48 import org.collectionspace.services.authorization.RoleValue;
49 import org.collectionspace.services.client.AccountClient;
50 import org.collectionspace.services.client.AccountFactory;
51 import org.collectionspace.services.client.AccountRoleClient;
52 import org.collectionspace.services.client.AccountRoleFactory;
53 import org.collectionspace.services.client.CollectionSpaceClient;
54 import org.collectionspace.services.client.DimensionClient;
55 import org.collectionspace.services.client.DimensionFactory;
56 import org.collectionspace.services.client.PayloadOutputPart;
57 import org.collectionspace.services.client.PermissionClient;
58 import org.collectionspace.services.client.PermissionFactory;
59 import org.collectionspace.services.client.PermissionRoleClient;
60 import org.collectionspace.services.client.PermissionRoleFactory;
61 import org.collectionspace.services.client.PoxPayloadIn;
62 import org.collectionspace.services.client.PoxPayloadOut;
63 import org.collectionspace.services.client.RoleClient;
64 import org.collectionspace.services.client.RoleFactory;
65 import org.collectionspace.services.client.test.BaseServiceTest;
66 import org.collectionspace.services.dimension.DimensionsCommon;
67 import org.collectionspace.services.jaxb.AbstractCommonList;
68 import org.testng.Assert;
69 import org.testng.annotations.Test;
70 import org.slf4j.Logger;
71 import org.slf4j.LoggerFactory;
72 import org.testng.annotations.AfterClass;
73 import org.testng.annotations.BeforeClass;
76 * AuthorizationServiceTest, carries out tests against a
77 * deployed and running Permission, Role, AccountRole, PermissionRole and
78 * CollectionObject Services.
80 * Pre-requisite : authorization-mgt/client tests seed some permissions used
83 * $LastChangedRevision: 917 $
84 * $LastChangedDate: 2009-11-06 12:20:28 -0800 (Fri, 06 Nov 2009) $
86 public class MultiTenancyTest extends BaseServiceTest<AbstractCommonList> {
88 private static class UserInfo {
92 UserInfo(String u, String p) {
98 private final String CLASS_NAME = MultiTenancyTest.class.getName();
99 private final Logger logger = LoggerFactory.getLogger(CLASS_NAME);
100 private final static String TENANT_1_ADMIN_USER = "admin@core.collectionspace.org";
101 private final static String TENANT_2_ADMIN_USER = "admin@testsci.collectionspace.org";
102 private final static String TENANT_ADMIN_PASS = "Administrator";
103 private final static String TENANT_1_USER = "user1@museum1.org";
104 private final static String TENANT_2_USER = "user2@museum2.org";
105 private final static String TENANT_1 = "1";
106 private final static String TENANT_2 = "2";
107 private final static String TEST_ROLE_NAME = "ROLE_TEST_REGISTRAR";
108 private final static String TEST_SERVICE_A = "dimensions";
110 // Instance variables specific to this test.
111 private String TENANT_RESOURCE_1 = null;
112 private String TENANT_RESOURCE_2 = null;
113 //key for userAccounts is userId
114 private Hashtable<String, AccountValue> userAccounts = new Hashtable<String, AccountValue>();
115 //key for permValues is id as there could be several perms for the same resource
116 private Hashtable<String, PermissionValue> permValues = new Hashtable<String, PermissionValue>();
117 //key for all tenantXXX tables is tenant id, expecting only one entity per tenant for this test
118 private Hashtable<String, UserInfo> tenantAdminUsers = new Hashtable<String, UserInfo>();
119 private Hashtable<String, AccountValue> tenantAccounts = new Hashtable<String, AccountValue>();
120 private Hashtable<String, RoleValue> tenantRoles = new Hashtable<String, RoleValue>();
121 private Hashtable<String, Role> tenantAdminRoles = new Hashtable<String, Role>();
122 private Hashtable<String, PermissionValue> tenantPermissions = new Hashtable<String, PermissionValue>();
125 * This method is called only by the parent class, AbstractServiceTestImpl
128 protected String getServicePathComponent() {
132 @BeforeClass(alwaysRun = true)
133 public void seedData() throws Exception {
134 //tenant admin users are used to create accounts, roles and permissions and relationships
135 //assumption : two tenant admin users exist before running this test
136 tenantAdminUsers.put(TENANT_1, new UserInfo(TENANT_1_ADMIN_USER, TENANT_ADMIN_PASS));
137 tenantAdminUsers.put(TENANT_2, new UserInfo(TENANT_2_ADMIN_USER, TENANT_ADMIN_PASS));
143 seedPermissionRoles();
146 private void seedAccounts() throws Exception {
147 seedAccount(TENANT_1, TENANT_1_USER);
148 seedAccount(TENANT_2, TENANT_2_USER);
151 private void seedAccount(String tenantId, String userId) throws Exception {
152 //create account using default user in admin role but assign tenant id
153 //create username, email and password same for simplicity
154 String accId = createAccount(tenantId, userId, userId);
155 AccountValue ava = new AccountValue();
156 ava.setScreenName(userId);
157 ava.setUserId(userId);
158 ava.setAccountId(accId);
159 userAccounts.put(ava.getUserId(), ava);
160 tenantAccounts.put(tenantId, ava);
161 if (logger.isDebugEnabled()) {
162 logger.debug("seedAccount tenantId=" + tenantId + " userId=" + userId);
166 private void seedPermissions() throws Exception {
167 String resource = TEST_SERVICE_A;
169 PermissionAction pac = new PermissionAction();
170 pac.setName(ActionType.CREATE);
171 PermissionAction par = new PermissionAction();
172 par.setName(ActionType.READ);
173 PermissionAction pau = new PermissionAction();
174 pau.setName(ActionType.UPDATE);
175 PermissionAction pad = new PermissionAction();
176 pad.setName(ActionType.DELETE);
178 //both users can create, read and update and delete
179 List<PermissionAction> testActions = new ArrayList<PermissionAction>();
180 testActions.add(pac);
181 testActions.add(par);
182 testActions.add(pau);
183 testActions.add(pad);
185 seedPermission(TENANT_1, resource, testActions, EffectType.PERMIT);
186 seedPermission(TENANT_2, resource, testActions, EffectType.PERMIT);
189 private void seedPermission(String tenantId,
190 String resource, List<PermissionAction> testActions, EffectType effect) throws Exception {
191 //create permission using default user in admin role but assign tenant id
192 String id = createPermission(tenantId, resource, testActions, effect);
193 PermissionValue pv = new PermissionValue();
194 pv.setResourceName(resource);
195 pv.setPermissionId(id);
196 permValues.put(pv.getPermissionId(), pv);
197 tenantPermissions.put(tenantId, pv);
198 if (logger.isDebugEnabled()) {
199 logger.debug("seedPermission tenantId=" + tenantId
200 + " permId=" + id + " resource=" + resource);
204 private void seedRoles() throws Exception {
205 //create role using default user in admin role but assign tenant id
206 //use the same role name to check constraints
207 seedRole(TENANT_1, TEST_ROLE_NAME);
208 seedRole(TENANT_2, TEST_ROLE_NAME);
211 private void seedRole(String tenantId, String roleName) throws Exception {
212 String rid = createRole(tenantId, roleName);
213 RoleValue rv = new RoleValue();
215 rv.setRoleName(roleName);
216 tenantRoles.put(tenantId, rv);
217 if (logger.isDebugEnabled()) {
218 logger.debug("seedRole tenantId=" + tenantId + " roleName=" + roleName);
222 private void seedAccountRoles() throws Exception {
223 for (String tenantId : tenantAccounts.keySet()) {
224 AccountValue av = (AccountValue) tenantAccounts.get(tenantId);
225 seedAccountRole(tenantId, av.getUserId());
229 private void seedAccountRole(String tenantId, String userId) throws Exception {
230 List<RoleValue> tenantRoleValues = new ArrayList<RoleValue>();
231 tenantRoleValues.add(tenantRoles.get(tenantId));
232 createAccountRole(tenantId, userAccounts.get(userId), tenantRoleValues);
233 if (logger.isDebugEnabled()) {
234 logger.debug("seedAccountRole tenantId=" + tenantId + " userId=" + userId);
238 private void seedPermissionRoles() throws Exception {
239 for (String tenantId : tenantPermissions.keySet()) {
240 PermissionValue pv = tenantPermissions.get(tenantId);
241 seedPermissionRole(tenantId, pv.getPermissionId());
245 private void seedPermissionRole(String tenantId, String permId) throws Exception {
246 List<RoleValue> tenantRoleValues = new ArrayList<RoleValue>();
247 tenantRoleValues.add(tenantRoles.get(tenantId));
248 PermissionValue pv = permValues.get(permId);
249 createPermissionRole(tenantId, permValues.get(permId), tenantRoleValues);
250 if (logger.isDebugEnabled()) {
251 logger.debug("seedPermissionRole tenantId=" + tenantId
252 + " permId=" + permId + " resource=" + pv.getResourceName());
257 * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
260 protected CollectionSpaceClient getClientInstance() {
265 protected CollectionSpaceClient getClientInstance(String clientPropertiesFilename) {
270 * @see org.collectionspace.services.client.test.BaseServiceTest#getAbstractCommonList(org.jboss.resteasy.client.ClientResponse)
273 protected AbstractCommonList getCommonList(Response response) {
274 //FIXME: http://issues.collectionspace.org/browse/CSPACE-1697
275 throw new UnsupportedOperationException();
278 // ---------------------------------------------------------------
279 // CRUD tests : CREATE tests
280 // ---------------------------------------------------------------
283 @Test(dataProvider = "testName")
284 public void create(String testName) throws Exception {
285 TENANT_RESOURCE_1 = create(testName, TENANT_1_USER, TENANT_1);
286 if (logger.isDebugEnabled()) {
287 logger.debug(testName + ": tenantId= " + TENANT_1
288 + " userId=" + TENANT_1_USER
289 + " TENANT_RESOURCE_1 id=" + TENANT_RESOURCE_1);
293 @Test(dataProvider = "testName")
294 public void create2(String testName) throws Exception {
295 TENANT_RESOURCE_2 = create(testName, TENANT_2_USER, TENANT_2);
296 if (logger.isDebugEnabled()) {
297 logger.debug(testName + ": tenantId= " + TENANT_2
298 + " userId=" + TENANT_2_USER
299 + " TENANT_RESOURCE_2 id=" + TENANT_RESOURCE_2);
303 private String create(String testName, String userName, String tenatnId) throws Exception {
304 String result = null;
308 // Create a new client and change the default AuthN credentials
310 DimensionClient client = new DimensionClient();
311 client.setAuth(true, userName, true, userName, true);
313 // Setup a dimension object to create
315 String identifier = createIdentifier();
316 DimensionsCommon dimension = new DimensionsCommon();
317 dimension.setDimension("dimensionType");
318 dimension.setMeasurementUnit("measurementUnit-" + identifier);
319 dimension.setValueDate(new Date().toString());
321 // Create a payload and send the POST request
323 PoxPayloadOut multipart = DimensionFactory.createDimensionInstance(client.getCommonPartName(),
325 Response res = client.create(multipart);
327 assertStatusCode(res, testName);
328 result = extractId(res);
339 // ---------------------------------------------------------------
340 // CRUD tests : READ tests
341 // ---------------------------------------------------------------
343 @Test(dataProvider = "testName",
344 dependsOnMethods = {"create"})
345 public void read(String testName) throws Exception {
346 DimensionsCommon dimension = read(testName, TENANT_RESOURCE_1, TENANT_1_USER);
347 Assert.assertNotNull(dimension);
348 if (logger.isDebugEnabled()) {
349 logger.debug(testName + ": tenantId= " + TENANT_1
350 + " userId=" + TENANT_1_USER
351 + " TENANT_RESOURCE_1 retrieved id=" + dimension.getCsid());
355 @Test(dataProvider = "testName",
356 dependsOnMethods = {"create2"})
357 public void read2(String testName) throws Exception {
358 DimensionsCommon dimension = read(testName, TENANT_RESOURCE_2, TENANT_2_USER);
359 Assert.assertNotNull(dimension);
360 if (logger.isDebugEnabled()) {
361 logger.debug(testName + ": tenantId= " + TENANT_2
362 + " userId=" + TENANT_2_USER
363 + " TENANT_RESOURCE_1 retrieved id=" + dimension.getCsid());
367 private DimensionsCommon read(String testName, String id, String userName) throws Exception {
368 DimensionsCommon result = null;
371 // Submit the request to the service and store the response.
372 DimensionClient client = new DimensionClient();
373 client.setAuth(true, userName, true, userName, true);
374 Response res = client.read(id);
376 assertStatusCode(res, testName);
377 PoxPayloadIn input = new PoxPayloadIn(res.readEntity(String.class));
378 result = (DimensionsCommon) extractPart(input,
379 client.getCommonPartName(), DimensionsCommon.class);
389 // ---------------------------------------------------------------
390 // CRUD tests : READ_LIST tests
391 // ---------------------------------------------------------------
393 @Test(dataProvider = "testName",
394 dependsOnMethods = {"read2"})
395 public void updateNonExistent(String testName) throws Exception {
397 setupUpdateNonExistent();
399 // Create a new client and change the default AuthN credentials
401 DimensionClient client = new DimensionClient();
402 //TENANT_1_USER is not allowed to update the resource of TENANT_2
403 client.setAuth(true, TENANT_1_USER, true, TENANT_1_USER, true);
405 // Create a new dimension object to try to update
407 DimensionsCommon dimension = new DimensionsCommon();
408 dimension.setDimension("dimensionType");
409 // Update the content of this resource.
410 dimension.setMeasurementUnit("updated-" + dimension.getMeasurementUnit());
411 dimension.setValueDate("updated-" + dimension.getValueDate());
413 // Create and send a dimension payload for the UPDATE request
415 PoxPayloadOut output = new PoxPayloadOut(DimensionClient.SERVICE_PAYLOAD_NAME);
416 PayloadOutputPart commonPart = output.addPart(client.getCommonPartName(), dimension);
417 Response res = client.update(TENANT_RESOURCE_2, output);
419 assertStatusCode(res, testName);
427 // ---------------------------------------------------------------
428 // CRUD tests : DELETE tests
429 // ---------------------------------------------------------------
431 @Test(dataProvider = "testName",
432 dependsOnMethods = {"deleteNonExistent"})
433 public void delete(String testName) throws Exception {
434 int statusCode = delete(testName, TENANT_RESOURCE_1, TENANT_1_USER);
437 @Test(dataProvider = "testName",
438 dependsOnMethods = {"updateNonExistent"})
439 public void delete2(String testName) throws Exception {
440 int statusCode = delete(testName, TENANT_RESOURCE_2, TENANT_2_USER);
444 private int delete(String testName, String id, String userName) throws Exception {
449 // Submit the request to the service and store the response.
450 DimensionClient client = new DimensionClient();
451 client.setAuth(true, userName, true, userName, true);
452 Response res = client.delete(id);
454 result = assertStatusCode(res, testName);
465 @Test(dataProvider = "testName",
466 dependsOnMethods = {"read"})
467 public void deleteNonExistent(String testName) throws Exception {
468 //ignoring this test as the service side returns 200 now even if it does
469 //not find a record in the db
474 // Submit the request to the service and store the response.
475 DimensionClient client = new DimensionClient();
476 //TENANT_2_USER of TENANT_2 is not allowed to delete the resource of TENANT_1
477 client.setAuth(true, TENANT_2_USER, true, TENANT_2_USER, true);
478 Response res = client.delete(TENANT_RESOURCE_1);
480 int statusCode = res.getStatus();
481 // Check the status code of the response: does it match
482 // the expected response(s)?
483 if (logger.isDebugEnabled()) {
484 logger.debug(testName + ": status = " + statusCode);
486 Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
487 invalidStatusCodeMessage(testRequestType, statusCode));
488 //going to incorrect Nuxeo domain would give DocumentNotFoundException
489 //instead of giving FORBIDDEN
490 Assert.assertEquals(statusCode, Response.Status.NOT_FOUND.getStatusCode());
498 // ---------------------------------------------------------------
499 // Utility methods used by tests above
500 // ---------------------------------------------------------------
501 @AfterClass(alwaysRun = true)
502 public void cleanUp() throws Exception {
504 String noTest = System.getProperty("noTestCleanup");
505 if (Boolean.TRUE.toString().equalsIgnoreCase(noTest)) {
506 if (logger.isDebugEnabled()) {
507 logger.debug("Skipping Cleanup phase ...");
511 if (logger.isDebugEnabled()) {
512 logger.debug("Cleaning up temporary resources created for testing ...");
515 //tenant admin users are used to create accounts, roles and permissions and relationships
516 //assumption : two tenant admin users exist before running this test
518 deletePermissionRoles();
519 deleteAccountRoles();
520 //deletePermissions would delete association with ROLE_XXX_ADMINISTRTOR too
521 //deletePermissions();
526 private void deletePermissionRoles() throws Exception {
527 for (String tenantId : tenantPermissions.keySet()) {
528 List<RoleValue> tenantRoleValues = new ArrayList<RoleValue>();
529 tenantRoleValues.add(tenantRoles.get(tenantId));
530 PermissionValue pv = tenantPermissions.get(tenantId);
531 deletePermissionRole(tenantId, pv, tenantRoleValues);
535 private void deleteAccountRoles() throws Exception {
536 for (String tenantId : tenantAccounts.keySet()) {
537 List<RoleValue> tenantRoleValues = new ArrayList<RoleValue>();
538 tenantRoleValues.add(tenantRoles.get(tenantId));
539 AccountValue av = tenantAccounts.get(tenantId);
540 deleteAccountRole(tenantId, av, tenantRoleValues);
544 private void deletePermissions() throws Exception {
545 for (String tenantId : tenantPermissions.keySet()) {
546 PermissionValue pv = tenantPermissions.get(tenantId);
547 deletePermission(tenantId, pv.getPermissionId());
551 private void deleteRoles() throws Exception {
552 for (String tenantId : tenantRoles.keySet()) {
553 RoleValue rv = tenantRoles.get(tenantId);
554 deleteRole(tenantId, rv.getRoleId());
558 private void deleteAccounts() throws Exception {
559 for (String tenantId : tenantAccounts.keySet()) {
560 AccountValue av = tenantAccounts.get(tenantId);
561 deleteAccount(tenantId, av.getAccountId());
565 private String createPermission(String tenantId, String resName,
566 List<PermissionAction> actions, EffectType effect) throws Exception {
567 String result = null;
570 PermissionClient permClient = new PermissionClient();
571 UserInfo ui = tenantAdminUsers.get(tenantId);
572 permClient.setAuth(true, ui.userName, true, ui.password, true);
573 Permission permission = PermissionFactory.createPermissionInstance(resName,
574 "default permissions for " + resName,
575 actions, effect, true, true, true);
576 permission.setTenantId(tenantId);
577 Response res = permClient.create(permission);
579 assertStatusCode(res, "CreatePermission");
580 result = extractId(res);
590 private void deletePermission(String tenantId, String permId) throws Exception {
592 PermissionClient permClient = new PermissionClient();
593 UserInfo ui = tenantAdminUsers.get(tenantId);
594 permClient.setAuth(true, ui.userName, true, ui.password, true);
595 Response res = permClient.delete(permId);
597 assertStatusCode(res, "DeletePermission");
605 private String createRole(String tenantId, String roleName) throws Exception {
606 String result = null;
609 RoleClient roleClient = new RoleClient();
610 UserInfo ui = tenantAdminUsers.get(tenantId);
611 roleClient.setAuth(true, ui.userName, true, ui.password, true);
612 Role role = RoleFactory.createRoleInstance(roleName,
613 roleName, //the display name
614 "role for " + roleName, true);
615 role.setTenantId(tenantId);
616 Response res = roleClient.create(role);
618 assertStatusCode(res, "CreateRole");
619 result = extractId(res);
629 private void deleteRole(String tenantId, String roleId) throws Exception {
631 RoleClient roleClient = new RoleClient();
632 UserInfo ui = tenantAdminUsers.get(tenantId);
633 roleClient.setAuth(true, ui.userName, true, ui.password, true);
634 Response res = roleClient.delete(roleId);
636 assertStatusCode(res, "DeleteRole");
644 private String createAccount(String tenantId, String userName, String email) throws Exception {
645 String result = null;
648 AccountClient accountClient = new AccountClient();
649 UserInfo ui = tenantAdminUsers.get(tenantId);
650 accountClient.setAuth(true, ui.userName, true, ui.password, true);
651 AccountsCommon account = AccountFactory.createAccountInstance(
652 userName, userName, userName, email, tenantId,
653 true, false, true, true);
654 Response res = accountClient.create(account);
656 assertStatusCode(res, "CreateAccount");
657 result = extractId(res);
667 private void deleteAccount(String tenantId, String accId) throws Exception {
669 AccountClient accClient = new AccountClient();
670 UserInfo ui = tenantAdminUsers.get(tenantId);
671 accClient.setAuth(true, ui.userName, true, ui.password, true);
672 Response res = accClient.delete(accId);
674 assertStatusCode(res, "DeleteAccount");
682 private String createAccountRole(String tenantId, AccountValue av,
683 Collection<RoleValue> rvs) throws Exception {
684 String result = null;
687 // Submit the request to the service and store the response.
688 AccountRole accRole = AccountRoleFactory.createAccountRoleInstance(
689 av, rvs, true, true);
690 AccountRoleClient client = new AccountRoleClient();
691 UserInfo ui = tenantAdminUsers.get(tenantId);
692 client.setAuth(true, ui.userName, true, ui.password, true);
693 Response res = client.create(av.getAccountId(), accRole);
695 assertStatusCode(res, "CreateAccountRole");
696 result = extractId(res);
706 private void deleteAccountRole(String tenantId, AccountValue av,
707 List<RoleValue> rvs) throws Exception {
711 // Submit the request to the service and store the response.
712 AccountRoleClient client = new AccountRoleClient();
713 UserInfo ui = tenantAdminUsers.get(tenantId);
714 client.setAuth(true, ui.userName, true, ui.password, true);
715 AccountRole accRole = AccountRoleFactory.createAccountRoleInstance(
716 av, rvs, true, true);
717 Response res = client.delete(av.getAccountId());
719 assertStatusCode(res, "DeleteAccountRole");
727 private String createPermissionRole(String tenantId, PermissionValue pv,
728 Collection<RoleValue> rvs) throws Exception {
729 String result = null;
732 List<RoleValue> rvls = new ArrayList<RoleValue>();
734 PermissionRole permRole = PermissionRoleFactory.createPermissionRoleInstance(
735 pv, rvls, true, true);
736 PermissionRoleClient client = new PermissionRoleClient();
737 UserInfo ui = tenantAdminUsers.get(tenantId);
738 client.setAuth(true, ui.userName, true, ui.password, true);
739 Response res = client.create(pv.getPermissionId(), permRole);
741 assertStatusCode(res, "createPermissionRole");
742 result = extractId(res);
752 private void deletePermissionRole(String tenantId, PermissionValue pv, List<RoleValue> rvls) throws Exception {
756 // Submit the request to the service and store the response.
757 PermissionRoleClient client = new PermissionRoleClient();
758 UserInfo ui = tenantAdminUsers.get(tenantId);
759 client.setAuth(true, ui.userName, true, ui.password, true);
760 PermissionRole permRole = PermissionRoleFactory.createPermissionRoleInstance(
761 pv, rvls, true, true);
762 Response res = client.delete(pv.getPermissionId());
764 assertStatusCode(res, "DeletePermissionRole");
773 protected String getServiceName() {
774 // TODO Auto-generated method stub
775 throw new UnsupportedOperationException();
779 protected Class<AbstractCommonList> getCommonListType() {
780 // TODO Auto-generated method stub
781 throw new UnsupportedOperationException();