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;
35 import javax.ws.rs.core.Response;
36 import org.collectionspace.services.account.AccountsCommon;
37 import org.collectionspace.services.authorization.AccountRole;
38 import org.collectionspace.services.authorization.AccountValue;
39 import org.collectionspace.services.authorization.perms.ActionType;
40 import org.collectionspace.services.authorization.perms.EffectType;
42 import org.collectionspace.services.authorization.perms.Permission;
43 import org.collectionspace.services.authorization.perms.PermissionAction;
44 import org.collectionspace.services.authorization.PermissionRole;
45 import org.collectionspace.services.authorization.PermissionValue;
46 import org.collectionspace.services.authorization.Role;
47 import org.collectionspace.services.authorization.RoleValue;
48 import org.collectionspace.services.client.AccountClient;
49 import org.collectionspace.services.client.AccountFactory;
50 import org.collectionspace.services.client.AccountRoleClient;
51 import org.collectionspace.services.client.AccountRoleFactory;
52 import org.collectionspace.services.client.CollectionSpaceClient;
53 import org.collectionspace.services.client.DimensionClient;
54 import org.collectionspace.services.client.DimensionFactory;
55 import org.collectionspace.services.client.PayloadOutputPart;
56 import org.collectionspace.services.client.PermissionClient;
57 import org.collectionspace.services.client.PermissionFactory;
58 import org.collectionspace.services.client.PermissionRoleClient;
59 import org.collectionspace.services.client.PermissionRoleFactory;
60 import org.collectionspace.services.client.PoxPayloadIn;
61 import org.collectionspace.services.client.PoxPayloadOut;
62 import org.collectionspace.services.client.RoleClient;
63 import org.collectionspace.services.client.RoleFactory;
64 import org.collectionspace.services.client.test.BaseServiceTest;
65 import org.collectionspace.services.dimension.DimensionsCommon;
66 import org.collectionspace.services.jaxb.AbstractCommonList;
67 import org.jboss.resteasy.client.ClientResponse;
69 import org.testng.Assert;
70 import org.testng.annotations.Test;
72 import org.slf4j.Logger;
73 import org.slf4j.LoggerFactory;
74 import org.testng.annotations.AfterClass;
75 import org.testng.annotations.BeforeClass;
78 * AuthorizationServiceTest, carries out tests against a
79 * deployed and running Permission, Role, AccountRole, PermissionRole and
80 * CollectionObject Services.
82 * Pre-requisite : authorization-mgt/client tests seed some permissions used
85 * $LastChangedRevision: 917 $
86 * $LastChangedDate: 2009-11-06 12:20:28 -0800 (Fri, 06 Nov 2009) $
88 public class MultiTenancyTest extends BaseServiceTest<AbstractCommonList> {
90 private static class UserInfo {
94 UserInfo(String u, String p) {
100 private final String CLASS_NAME = MultiTenancyTest.class.getName();
101 private final Logger logger = LoggerFactory.getLogger(CLASS_NAME);
102 private final static String TENANT_1_ADMIN_USER = "admin@core.collectionspace.org";
103 private final static String TENANT_2_ADMIN_USER = "admin@lifesci.collectionspace.org";
104 private final static String TENANT_ADMIN_PASS = "Administrator";
105 private final static String TENANT_1_USER = "user1@museum1.org";
106 private final static String TENANT_2_USER = "user2@museum2.org";
107 private final static String TENANT_1 = "1";
108 private final static String TENANT_2 = "2";
109 private final static String TEST_ROLE_NAME = "ROLE_TEST_REGISTRAR";
110 private final static String TEST_SERVICE_A = "dimensions";
112 // Instance variables specific to this test.
113 private String TENANT_RESOURCE_1 = null;
114 private String TENANT_RESOURCE_2 = null;
115 //key for userAccounts is userId
116 private Hashtable<String, AccountValue> userAccounts = new Hashtable<String, AccountValue>();
117 //key for permValues is id as there could be several perms for the same resource
118 private Hashtable<String, PermissionValue> permValues = new Hashtable<String, PermissionValue>();
119 //key for all tenantXXX tables is tenant id, expecting only one entity per tenant for this test
120 private Hashtable<String, UserInfo> tenantAdminUsers = new Hashtable<String, UserInfo>();
121 private Hashtable<String, AccountValue> tenantAccounts = new Hashtable<String, AccountValue>();
122 private Hashtable<String, RoleValue> tenantRoles = new Hashtable<String, RoleValue>();
123 private Hashtable<String, Role> tenantAdminRoles = new Hashtable<String, Role>();
124 private Hashtable<String, PermissionValue> tenantPermissions = new Hashtable<String, PermissionValue>();
127 * This method is called only by the parent class, AbstractServiceTestImpl
130 protected String getServicePathComponent() {
134 @BeforeClass(alwaysRun = true)
135 public void seedData() {
136 //tenant admin users are used to create accounts, roles and permissions and relationships
137 //assumption : two tenant admin users exist before running this test
138 tenantAdminUsers.put(TENANT_1, new UserInfo(TENANT_1_ADMIN_USER, TENANT_ADMIN_PASS));
139 tenantAdminUsers.put(TENANT_2, new UserInfo(TENANT_2_ADMIN_USER, TENANT_ADMIN_PASS));
145 seedPermissionRoles();
148 private void seedAccounts() {
149 seedAccount(TENANT_1, TENANT_1_USER);
150 seedAccount(TENANT_2, TENANT_2_USER);
153 private void seedAccount(String tenantId, String userId) {
154 //create account using default user in admin role but assign tenant id
155 //create username, email and password same for simplicity
156 String accId = createAccount(tenantId, userId, userId);
157 AccountValue ava = new AccountValue();
158 ava.setScreenName(userId);
159 ava.setUserId(userId);
160 ava.setAccountId(accId);
161 userAccounts.put(ava.getUserId(), ava);
162 tenantAccounts.put(tenantId, ava);
163 if (logger.isDebugEnabled()) {
164 logger.debug("seedAccount tenantId=" + tenantId + " userId=" + userId);
168 private void seedPermissions() {
169 String resource = TEST_SERVICE_A;
171 PermissionAction pac = new PermissionAction();
172 pac.setName(ActionType.CREATE);
173 PermissionAction par = new PermissionAction();
174 par.setName(ActionType.READ);
175 PermissionAction pau = new PermissionAction();
176 pau.setName(ActionType.UPDATE);
177 PermissionAction pad = new PermissionAction();
178 pad.setName(ActionType.DELETE);
180 //both users can create, read and update and delete
181 List<PermissionAction> testActions = new ArrayList<PermissionAction>();
182 testActions.add(pac);
183 testActions.add(par);
184 testActions.add(pau);
185 testActions.add(pad);
187 seedPermission(TENANT_1, resource, testActions, EffectType.PERMIT);
188 seedPermission(TENANT_2, resource, testActions, EffectType.PERMIT);
191 private void seedPermission(String tenantId,
192 String resource, List<PermissionAction> testActions, EffectType effect) {
193 //create permission using default user in admin role but assign tenant id
194 String id = createPermission(tenantId, resource, testActions, effect);
195 PermissionValue pv = new PermissionValue();
196 pv.setResourceName(resource);
197 pv.setPermissionId(id);
198 permValues.put(pv.getPermissionId(), pv);
199 tenantPermissions.put(tenantId, pv);
200 if (logger.isDebugEnabled()) {
201 logger.debug("seedPermission tenantId=" + tenantId
202 + " permId=" + id + " resource=" + resource);
206 private void seedRoles() {
207 //create role using default user in admin role but assign tenant id
208 //use the same role name to check constraints
209 seedRole(TENANT_1, TEST_ROLE_NAME);
210 seedRole(TENANT_2, TEST_ROLE_NAME);
213 private void seedRole(String tenantId, String roleName) {
214 String rid = createRole(tenantId, roleName);
215 RoleValue rv = new RoleValue();
217 rv.setRoleName(roleName);
218 tenantRoles.put(tenantId, rv);
219 if (logger.isDebugEnabled()) {
220 logger.debug("seedRole tenantId=" + tenantId + " roleName=" + roleName);
224 private void seedAccountRoles() {
225 for (String tenantId : tenantAccounts.keySet()) {
226 AccountValue av = (AccountValue) tenantAccounts.get(tenantId);
227 seedAccountRole(tenantId, av.getUserId());
231 private void seedAccountRole(String tenantId, String userId) {
232 List<RoleValue> tenantRoleValues = new ArrayList<RoleValue>();
233 tenantRoleValues.add(tenantRoles.get(tenantId));
234 createAccountRole(tenantId, userAccounts.get(userId), tenantRoleValues);
235 if (logger.isDebugEnabled()) {
236 logger.debug("seedAccountRole tenantId=" + tenantId + " userId=" + userId);
240 private void seedPermissionRoles() {
241 for (String tenantId : tenantPermissions.keySet()) {
242 PermissionValue pv = tenantPermissions.get(tenantId);
243 seedPermissionRole(tenantId, pv.getPermissionId());
247 private void seedPermissionRole(String tenantId, String permId) {
248 List<RoleValue> tenantRoleValues = new ArrayList<RoleValue>();
249 tenantRoleValues.add(tenantRoles.get(tenantId));
250 PermissionValue pv = permValues.get(permId);
251 createPermissionRole(tenantId, permValues.get(permId), tenantRoleValues);
252 if (logger.isDebugEnabled()) {
253 logger.debug("seedPermissionRole tenantId=" + tenantId
254 + " permId=" + permId + " resource=" + pv.getResourceName());
259 * @see org.collectionspace.services.client.test.BaseServiceTest#getClientInstance()
262 protected CollectionSpaceClient getClientInstance() {
267 * @see org.collectionspace.services.client.test.BaseServiceTest#getAbstractCommonList(org.jboss.resteasy.client.ClientResponse)
270 protected AbstractCommonList getCommonList(Response response) {
271 //FIXME: http://issues.collectionspace.org/browse/CSPACE-1697
272 throw new UnsupportedOperationException();
275 // ---------------------------------------------------------------
276 // CRUD tests : CREATE tests
277 // ---------------------------------------------------------------
280 @Test(dataProvider = "testName")
281 public void create(String testName) throws Exception {
282 TENANT_RESOURCE_1 = create(testName, TENANT_1_USER, TENANT_1);
283 if (logger.isDebugEnabled()) {
284 logger.debug(testName + ": tenantId= " + TENANT_1
285 + " userId=" + TENANT_1_USER
286 + " TENANT_RESOURCE_1 id=" + TENANT_RESOURCE_1);
290 @Test(dataProvider = "testName")
291 public void create2(String testName) throws Exception {
292 TENANT_RESOURCE_2 = create(testName, TENANT_2_USER, TENANT_2);
293 if (logger.isDebugEnabled()) {
294 logger.debug(testName + ": tenantId= " + TENANT_2
295 + " userId=" + TENANT_2_USER
296 + " TENANT_RESOURCE_2 id=" + TENANT_RESOURCE_2);
300 private String create(String testName, String userName, String tenatnId) {
301 String result = null;
305 // Create a new client and change the default AuthN credentials
307 DimensionClient client = new DimensionClient();
308 client.setAuth(true, userName, true, userName, true);
310 // Setup a dimension object to create
312 String identifier = createIdentifier();
313 DimensionsCommon dimension = new DimensionsCommon();
314 dimension.setDimension("dimensionType");
315 dimension.setMeasurementUnit("measurementUnit-" + identifier);
316 dimension.setValueDate(new Date().toString());
318 // Create a payload and send the POST request
320 PoxPayloadOut multipart = DimensionFactory.createDimensionInstance(client.getCommonPartName(),
322 Response res = client.create(multipart);
324 assertStatusCode(res, testName);
325 result = extractId(res);
336 // ---------------------------------------------------------------
337 // CRUD tests : READ tests
338 // ---------------------------------------------------------------
340 @Test(dataProvider = "testName",
341 dependsOnMethods = {"create"})
342 public void read(String testName) throws Exception {
343 DimensionsCommon dimension = read(testName, TENANT_RESOURCE_1, TENANT_1_USER);
344 Assert.assertNotNull(dimension);
345 if (logger.isDebugEnabled()) {
346 logger.debug(testName + ": tenantId= " + TENANT_1
347 + " userId=" + TENANT_1_USER
348 + " TENANT_RESOURCE_1 retrieved id=" + dimension.getCsid());
352 @Test(dataProvider = "testName",
353 dependsOnMethods = {"create2"})
354 public void read2(String testName) throws Exception {
355 DimensionsCommon dimension = read(testName, TENANT_RESOURCE_2, TENANT_2_USER);
356 Assert.assertNotNull(dimension);
357 if (logger.isDebugEnabled()) {
358 logger.debug(testName + ": tenantId= " + TENANT_2
359 + " userId=" + TENANT_2_USER
360 + " TENANT_RESOURCE_1 retrieved id=" + dimension.getCsid());
364 private DimensionsCommon read(String testName, String id, String userName) throws Exception {
365 DimensionsCommon result = null;
368 // Submit the request to the service and store the response.
369 DimensionClient client = new DimensionClient();
370 client.setAuth(true, userName, true, userName, true);
371 Response res = client.read(id);
373 assertStatusCode(res, testName);
374 PoxPayloadIn input = new PoxPayloadIn((String)res.getEntity());
375 result = (DimensionsCommon) extractPart(input,
376 client.getCommonPartName(), DimensionsCommon.class);
386 // ---------------------------------------------------------------
387 // CRUD tests : READ_LIST tests
388 // ---------------------------------------------------------------
390 @Test(dataProvider = "testName",
391 dependsOnMethods = {"read2"})
392 public void updateNonExistent(String testName) throws Exception {
394 setupUpdateNonExistent();
396 // Create a new client and change the default AuthN credentials
398 DimensionClient client = new DimensionClient();
399 //TENANT_1_USER is not allowed to update the resource of TENANT_2
400 client.setAuth(true, TENANT_1_USER, true, TENANT_1_USER, true);
402 // Create a new dimension object to try to update
404 DimensionsCommon dimension = new DimensionsCommon();
405 dimension.setDimension("dimensionType");
406 // Update the content of this resource.
407 dimension.setMeasurementUnit("updated-" + dimension.getMeasurementUnit());
408 dimension.setValueDate("updated-" + dimension.getValueDate());
410 // Create and send a dimension payload for the UPDATE request
412 PoxPayloadOut output = new PoxPayloadOut(DimensionClient.SERVICE_PAYLOAD_NAME);
413 PayloadOutputPart commonPart = output.addPart(client.getCommonPartName(), dimension);
414 Response res = client.update(TENANT_RESOURCE_2, output);
416 assertStatusCode(res, testName);
424 // ---------------------------------------------------------------
425 // CRUD tests : DELETE tests
426 // ---------------------------------------------------------------
428 @Test(dataProvider = "testName",
429 dependsOnMethods = {"deleteNonExistent"})
430 public void delete(String testName) throws Exception {
431 int statusCode = delete(testName, TENANT_RESOURCE_1, TENANT_1_USER);
434 @Test(dataProvider = "testName",
435 dependsOnMethods = {"updateNonExistent"})
436 public void delete2(String testName) throws Exception {
437 int statusCode = delete(testName, TENANT_RESOURCE_2, TENANT_2_USER);
441 private int delete(String testName, String id, String userName) throws Exception {
446 // Submit the request to the service and store the response.
447 DimensionClient client = new DimensionClient();
448 client.setAuth(true, userName, true, userName, true);
449 Response res = client.delete(id);
451 result = assertStatusCode(res, testName);
462 @Test(dataProvider = "testName",
463 dependsOnMethods = {"read"})
464 public void deleteNonExistent(String testName) throws Exception {
465 //ignoring this test as the service side returns 200 now even if it does
466 //not find a record in the db
471 // Submit the request to the service and store the response.
472 DimensionClient client = new DimensionClient();
473 //TENANT_2_USER of TENANT_2 is not allowed to delete the resource of TENANT_1
474 client.setAuth(true, TENANT_2_USER, true, TENANT_2_USER, true);
475 Response res = client.delete(TENANT_RESOURCE_1);
477 int statusCode = res.getStatus();
478 // Check the status code of the response: does it match
479 // the expected response(s)?
480 if (logger.isDebugEnabled()) {
481 logger.debug(testName + ": status = " + statusCode);
483 Assert.assertTrue(testRequestType.isValidStatusCode(statusCode),
484 invalidStatusCodeMessage(testRequestType, statusCode));
485 //going to incorrect Nuxeo domain would give DocumentNotFoundException
486 //instead of giving FORBIDDEN
487 Assert.assertEquals(statusCode, Response.Status.NOT_FOUND.getStatusCode());
495 // ---------------------------------------------------------------
496 // Utility methods used by tests above
497 // ---------------------------------------------------------------
498 @AfterClass(alwaysRun = true)
499 public void cleanUp() {
501 String noTest = System.getProperty("noTestCleanup");
502 if (Boolean.TRUE.toString().equalsIgnoreCase(noTest)) {
503 if (logger.isDebugEnabled()) {
504 logger.debug("Skipping Cleanup phase ...");
508 if (logger.isDebugEnabled()) {
509 logger.debug("Cleaning up temporary resources created for testing ...");
512 //tenant admin users are used to create accounts, roles and permissions and relationships
513 //assumption : two tenant admin users exist before running this test
515 deletePermissionRoles();
516 deleteAccountRoles();
517 //deletePermissions would delete association with ROLE_XXX_ADMINISTRTOR too
518 //deletePermissions();
523 private void deletePermissionRoles() {
524 for (String tenantId : tenantPermissions.keySet()) {
525 List<RoleValue> tenantRoleValues = new ArrayList<RoleValue>();
526 tenantRoleValues.add(tenantRoles.get(tenantId));
527 PermissionValue pv = tenantPermissions.get(tenantId);
528 deletePermissionRole(tenantId, pv, tenantRoleValues);
532 private void deleteAccountRoles() {
533 for (String tenantId : tenantAccounts.keySet()) {
534 List<RoleValue> tenantRoleValues = new ArrayList<RoleValue>();
535 tenantRoleValues.add(tenantRoles.get(tenantId));
536 AccountValue av = tenantAccounts.get(tenantId);
537 deleteAccountRole(tenantId, av, tenantRoleValues);
541 private void deletePermissions() {
542 for (String tenantId : tenantPermissions.keySet()) {
543 PermissionValue pv = tenantPermissions.get(tenantId);
544 deletePermission(tenantId, pv.getPermissionId());
548 private void deleteRoles() {
549 for (String tenantId : tenantRoles.keySet()) {
550 RoleValue rv = tenantRoles.get(tenantId);
551 deleteRole(tenantId, rv.getRoleId());
555 private void deleteAccounts() {
556 for (String tenantId : tenantAccounts.keySet()) {
557 AccountValue av = tenantAccounts.get(tenantId);
558 deleteAccount(tenantId, av.getAccountId());
562 private String createPermission(String tenantId, String resName,
563 List<PermissionAction> actions, EffectType effect) {
564 String result = null;
567 PermissionClient permClient = new PermissionClient();
568 UserInfo ui = tenantAdminUsers.get(tenantId);
569 permClient.setAuth(true, ui.userName, true, ui.password, true);
570 Permission permission = PermissionFactory.createPermissionInstance(resName,
571 "default permissions for " + resName,
572 actions, effect, true, true, true);
573 permission.setTenantId(tenantId);
574 ClientResponse<Response> res = permClient.create(permission);
576 assertStatusCode(res, "CreatePermission");
577 result = extractId(res);
587 private void deletePermission(String tenantId, String permId) {
589 PermissionClient permClient = new PermissionClient();
590 UserInfo ui = tenantAdminUsers.get(tenantId);
591 permClient.setAuth(true, ui.userName, true, ui.password, true);
592 Response res = permClient.delete(permId);
594 assertStatusCode(res, "DeletePermission");
602 private String createRole(String tenantId, String roleName) {
603 String result = null;
606 RoleClient roleClient = new RoleClient();
607 UserInfo ui = tenantAdminUsers.get(tenantId);
608 roleClient.setAuth(true, ui.userName, true, ui.password, true);
609 Role role = RoleFactory.createRoleInstance(roleName,
610 roleName, //the display name
611 "role for " + roleName, true);
612 role.setTenantId(tenantId);
613 ClientResponse<Response> res = roleClient.create(role);
615 assertStatusCode(res, "CreateRole");
616 result = extractId(res);
626 private void deleteRole(String tenantId, String roleId) {
628 RoleClient roleClient = new RoleClient();
629 UserInfo ui = tenantAdminUsers.get(tenantId);
630 roleClient.setAuth(true, ui.userName, true, ui.password, true);
631 Response res = roleClient.delete(roleId);
633 assertStatusCode(res, "DeleteRole");
641 private String createAccount(String tenantId, String userName, String email) {
642 String result = null;
645 AccountClient accountClient = new AccountClient();
646 UserInfo ui = tenantAdminUsers.get(tenantId);
647 accountClient.setAuth(true, ui.userName, true, ui.password, true);
648 AccountsCommon account = AccountFactory.createAccountInstance(
649 userName, userName, userName, email, tenantId,
650 true, false, true, true);
651 ClientResponse<Response> res = accountClient.create(account);
653 assertStatusCode(res, "CreateAccount");
654 result = extractId(res);
664 private void deleteAccount(String tenantId, String accId) {
666 AccountClient accClient = new AccountClient();
667 UserInfo ui = tenantAdminUsers.get(tenantId);
668 accClient.setAuth(true, ui.userName, true, ui.password, true);
669 Response res = accClient.delete(accId);
671 assertStatusCode(res, "DeleteAccount");
679 private String createAccountRole(String tenantId, AccountValue av,
680 Collection<RoleValue> rvs) {
681 String result = null;
684 // Submit the request to the service and store the response.
685 AccountRole accRole = AccountRoleFactory.createAccountRoleInstance(
686 av, rvs, true, true);
687 AccountRoleClient client = new AccountRoleClient();
688 UserInfo ui = tenantAdminUsers.get(tenantId);
689 client.setAuth(true, ui.userName, true, ui.password, true);
690 ClientResponse<Response> res = client.create(av.getAccountId(), accRole);
692 assertStatusCode(res, "CreateAccountRole");
693 result = extractId(res);
703 private void deleteAccountRole(String tenantId, AccountValue av,
704 List<RoleValue> rvs) {
708 // Submit the request to the service and store the response.
709 AccountRoleClient client = new AccountRoleClient();
710 UserInfo ui = tenantAdminUsers.get(tenantId);
711 client.setAuth(true, ui.userName, true, ui.password, true);
712 AccountRole accRole = AccountRoleFactory.createAccountRoleInstance(
713 av, rvs, true, true);
714 Response res = client.delete(av.getAccountId());
716 assertStatusCode(res, "DeleteAccountRole");
724 private String createPermissionRole(String tenantId, PermissionValue pv,
725 Collection<RoleValue> rvs) {
726 String result = null;
729 List<RoleValue> rvls = new ArrayList<RoleValue>();
731 PermissionRole permRole = PermissionRoleFactory.createPermissionRoleInstance(
732 pv, rvls, true, true);
733 PermissionRoleClient client = new PermissionRoleClient();
734 UserInfo ui = tenantAdminUsers.get(tenantId);
735 client.setAuth(true, ui.userName, true, ui.password, true);
736 ClientResponse<Response> res = client.create(pv.getPermissionId(), permRole);
738 assertStatusCode(res, "createPermissionRole");
739 result = extractId(res);
749 private void deletePermissionRole(String tenantId, PermissionValue pv, List<RoleValue> rvls) {
753 // Submit the request to the service and store the response.
754 PermissionRoleClient client = new PermissionRoleClient();
755 UserInfo ui = tenantAdminUsers.get(tenantId);
756 client.setAuth(true, ui.userName, true, ui.password, true);
757 PermissionRole permRole = PermissionRoleFactory.createPermissionRoleInstance(
758 pv, rvls, true, true);
759 Response res = client.delete(pv.getPermissionId());
761 assertStatusCode(res, "DeletePermissionRole");
770 protected String getServiceName() {
771 // TODO Auto-generated method stub
772 throw new UnsupportedOperationException();
776 protected Class<AbstractCommonList> getCommonListType() {
777 // TODO Auto-generated method stub
778 throw new UnsupportedOperationException();