public class GlobalPermissionControl extends BackdoorControl<GlobalPermissionControl>
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilterADMIN_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> |
getGroupPermissions(TestGroup group)
Get current global group permissions.
|
List<BambooPermission> |
getRolePermissions(BambooRole role)
Get current global role permissions.
|
List<BambooPermission> |
getUserPermissions(TestUser user)
Get current global user 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(BambooPermission... permissions)
Updates the Logged in users global permissions in the Bamboo instance.
|
void |
setLoggedUserPermission(Collection<BambooPermission> permissions)
Updates the Logged in users global permissions in the Bamboo instance.
|
void |
setLoggedUserPermission(Stream<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.
|
void |
tearDown()
Cleanup resources
|
client, createResourceForPath, get, getEnvironmentData, getRestModulePath, percentEncode, ping, post, resourceRootpublic GlobalPermissionControl(@NotNull
BambooEnvironmentData environmentData)
public void tearDown()
BackdoorControltearDown in class BackdoorControl<GlobalPermissionControl>public void setAnonymousAccess(boolean isEnabled)
isEnabled - true if anonymous access is to be allowed, false otherwise@NotNull public List<BambooPermission> getUserPermissions(@NotNull TestUser user) throws Exception
Exceptionpublic void setUserPermissions(@NotNull
TestUser testUser,
@NotNull
Collection<BambooPermission> permissions)
throws Exception
Exceptionpublic void setLoggedUserPermission(Collection<BambooPermission> permissions)
permissions - list of permissions to be grantedpublic void setLoggedUserPermission(BambooPermission... permissions)
permissions - list of permissions to be grantedpublic void setLoggedUserPermission(Stream<BambooPermission> permissions)
@NotNull public List<BambooPermission> getGroupPermissions(@NotNull TestGroup group) throws Exception
Exceptionpublic void setGroupPermissions(@NotNull
TestGroup testGroup,
@NotNull
Collection<BambooPermission> permissions)
throws Exception
Exception@NotNull public List<BambooPermission> getRolePermissions(@NotNull BambooRole role)
public void setRolePermissions(@NotNull
BambooRole role,
@NotNull
Collection<BambooPermission> permissions)
throws Exception
Exceptionprotected com.sun.jersey.api.client.WebResource createResource()
BackdoorControlBackdoorControl.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.createResourceForPath(java.lang.String)createResource in class BackdoorControl<GlobalPermissionControl>BackdoorControl.createResource(),
BackdoorControl.getRestModulePath()Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.