public class UserPermissionAdminResourceTest extends RestCrowdServiceAcceptanceTestCase
For a sanity check, it is also checking that you cant revoke your own rights.
| Modifier and Type | Class and Description |
|---|---|
protected class |
UserPermissionAdminResourceTest.GroupData |
| Modifier and Type | Field and Description |
|---|---|
static String |
ADMIN_PW |
static String |
ADMIN_USER |
protected static String |
ANIMALS |
static String |
ANON_PERMISSION_DENIED |
protected static String |
BADGERS |
protected static String |
BIRDS |
protected static String |
CATS |
protected static String |
CROWD_ADMINS |
protected static String |
CROWD_TESTERS |
protected static String |
CROWD_USERS |
protected static Long |
DIRECTORY1_ID |
protected static String |
DIRECTORY1_NAME |
protected static Long |
DIRECTORY2_ID |
protected static String |
DIRECTORY2_NAME |
protected static String |
DOGS |
static String |
USER_PERMISSION_DENIED |
static String |
USERNAME_PARAM |
ADMIN_PASSWORD, ADMIN_USERNAME, APPLICATION_NAME, APPLICATION_PASSWORD, ATTRIBUTES_RESOURCE, AUTHENTICATION_RESOURCE, EEEEP_PASSWORD, EEEEP_USERNAME, EVENTS_RESOURCE, GROUP_BADGERS, GROUP_BADGERS_DESCRIPTION, GROUP_CROWD_ADMINS, GROUP_CROWD_TESTERS, GROUP_CROWD_USERS, GROUPS_RESOURCE, MT, NON_ADMIN_USER_NAME, NON_ADMIN_USER_PASSWORD, NON_CROWD_USER_PASSWORD, NON_CROWD_USER_USERNAME, NON_EXISTENT_GROUP, NON_EXISTENT_USER, PENNY_USERNAME, REST_SERVICE_NAME, restServer, SECOND_ADMIN_PASSWORD, SECOND_ADMIN_USERNAME, SESSION_RESOURCE, USERS_RESOURCE, WEBHOOKS_RESOURCE| Constructor and Description |
|---|
UserPermissionAdminResourceTest(String name)
Constructs a test case with the given name.
|
UserPermissionAdminResourceTest(String name,
RestServer restServer)
Constructs a test case with the given name, using the given RestServer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
testAnonCanNotGrantPermissions() |
void |
testAnonCanNotListGroups() |
void |
testAnonCanNotListPermissions() |
void |
testAnonCanNotRevokePermissions() |
void |
testCannotRevokeOwnRights() |
void |
testGrantPermissions() |
void |
testListGroups() |
void |
testListGroupsWithParams() |
void |
testListPermissions() |
void |
testRevokePermissions() |
authenticateUser, authenticateUser, deactivateUser, getBaseUriBuilder, getBaseUriBuilder, getBaseUriBuilder, getRootWebResource, getServerUriBuilder, getWebResource, getWebResource, requestEvents, requestEventToken, setRestServer, setUp, tearDownassertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toStringprotected static final String ANIMALS
protected static final String BADGERS
protected static final String BIRDS
protected static final String CATS
protected static final String CROWD_ADMINS
protected static final String CROWD_TESTERS
protected static final String CROWD_USERS
protected static final String DOGS
protected static final Long DIRECTORY1_ID
protected static final Long DIRECTORY2_ID
protected static final String DIRECTORY1_NAME
protected static final String DIRECTORY2_NAME
public static final String ANON_PERMISSION_DENIED
public static final String USER_PERMISSION_DENIED
public static final String ADMIN_USER
public static final String ADMIN_PW
public static final String USERNAME_PARAM
public UserPermissionAdminResourceTest(String name)
name - the test namepublic UserPermissionAdminResourceTest(String name, RestServer restServer)
name - the test namerestServer - the RestServerpublic void testAnonCanNotListPermissions()
throws Exception
Exceptionpublic void testAnonCanNotGrantPermissions()
throws Exception
Exceptionpublic void testAnonCanNotRevokePermissions()
throws Exception
Exceptionpublic void testCannotRevokeOwnRights()
throws Exception
ExceptionCopyright © 2023 Atlassian. All rights reserved.