com.atlassian.jira.functest.framework.backdoor
Class PermissionSchemesControl

java.lang.Object
  extended by com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient<T>
      extended by com.atlassian.jira.functest.framework.backdoor.BackdoorControl<PermissionSchemesControl>
          extended by com.atlassian.jira.functest.framework.backdoor.PermissionSchemesControl
All Implemented Interfaces:
FuncTestLogger

public class PermissionSchemesControl
extends BackdoorControl<PermissionSchemesControl>

Use this class from func/selenium/page-object tests that need to manipulate Permission Schemes. See PermissionSchemesBackdoor for the code this plugs into at the back-end.

Since:
v5.0

Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient.Method
 
Field Summary
 
Fields inherited from class com.atlassian.jira.functest.framework.backdoor.BackdoorControl
restPathRootLength
 
Fields inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
REST_VERSION
 
Constructor Summary
PermissionSchemesControl(com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData)
           
 
Method Summary
 void addGroupPermission(Long schemeId, int permission, String groupName)
           
 Long copyDefaultScheme(String schemeName)
          Makes a copy of the Default Permission Scheme and returns the id of the new scheme.
 void removeGroupPermission(long schemeId, int permission, String groupName)
           
 void replaceGroupPermissions(long schemeId, int permission, String groupName)
          Removes any matching permission scheme entities for the given permission and adds an entity for the passed group.
 
Methods inherited from class com.atlassian.jira.functest.framework.backdoor.BackdoorControl
createResource, delete, get, get, get, getId, log, log, post
 
Methods inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
anonymous, errorResponse, expanded, loginAs, loginAs, percentEncode, resourceRoot, setOf, toResponse, toResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionSchemesControl

public PermissionSchemesControl(com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData)
Method Detail

copyDefaultScheme

public Long copyDefaultScheme(String schemeName)
Makes a copy of the Default Permission Scheme and returns the id of the new scheme.

Parameters:
schemeName - the name of the new scheme
Returns:
{Long} the schemeId of the created scheme

addGroupPermission

public void addGroupPermission(Long schemeId,
                               int permission,
                               String groupName)

removeGroupPermission

public void removeGroupPermission(long schemeId,
                                  int permission,
                                  String groupName)

replaceGroupPermissions

public void replaceGroupPermissions(long schemeId,
                                    int permission,
                                    String groupName)
Removes any matching permission scheme entities for the given permission and adds an entity for the passed group.



Copyright © 2002-2012 Atlassian. All Rights Reserved.