public class GlobalPermissionControl extends BackdoorControl<GlobalPermissionControl>
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilter
ADMIN_REST_PATH, API_REST_PATH, DEFAULT_REST_PATH, rootPath
Constructor and Description |
---|
GlobalPermissionControl(BambooEnvironmentData environmentData) |
Modifier and Type | Method and Description |
---|---|
protected com.sun.jersey.api.client.WebResource |
createResource()
Creates the resource that corresponds to the root of the TestKit REST API, using the values returned by
BackdoorControl.getRestModulePath() . |
List<BambooPermission> |
getRolePermissions(BambooRole role)
Get current global role permissions.
|
void |
setAnonymousAccess(boolean isEnabled)
Updates the Anonymous Access global permission in the Bamboo instance.
|
void |
setGroupPermissions(TestGroup testGroup,
Collection<BambooPermission> permissions)
Set global permissions for a user group.
|
void |
setLoggedUserPermission(List<BambooPermission> permissions)
Updates the Logged in users global permissions in the Bamboo instance.
|
void |
setRolePermissions(BambooRole role,
Collection<BambooPermission> permissions)
Set global role permissions.
|
void |
setUserPermissions(TestUser testUser,
Collection<BambooPermission> permissions)
Set global permissions for a user.
|
client, createResourceForPath, get, getEnvironmentData, getRestModulePath, percentEncode, ping, post, resourceRoot, tearDown
public GlobalPermissionControl(@NotNull BambooEnvironmentData environmentData)
public void setAnonymousAccess(boolean isEnabled)
isEnabled
- true if anonymous access is to be allowed, false otherwisepublic void setUserPermissions(@NotNull TestUser testUser, @NotNull Collection<BambooPermission> permissions) throws Exception
Exception
public void setLoggedUserPermission(List<BambooPermission> permissions)
permissions
- list of permissions to be grantedpublic void setGroupPermissions(@NotNull TestGroup testGroup, @NotNull Collection<BambooPermission> permissions) throws Exception
Exception
@NotNull public List<BambooPermission> getRolePermissions(@NotNull BambooRole role) throws Exception
Exception
public void setRolePermissions(@NotNull BambooRole role, @NotNull Collection<BambooPermission> permissions) throws Exception
Exception
protected com.sun.jersey.api.client.WebResource createResource()
BackdoorControl
BackdoorControl.getRestModulePath()
. Note that the created WebResource
has the following properties: Content-Type: application/json
by
default (override with WebResource.type(javax.ws.rs.core.MediaType)
)BackdoorControl.createResource()
createResource
in class BackdoorControl<GlobalPermissionControl>
BackdoorControl.createResource()
,
BackdoorControl.getRestModulePath()
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.