Class PermissionsTableComponent
- java.lang.Object
-
- com.atlassian.bamboo.pageobjects.components.permissions.PermissionsTableComponent
-
public class PermissionsTableComponent extends Object
Component for performing operations on permissions table. Part ofEditPermissionsComponent
, shouldn't be bound manually.Methods from this component should be chained, because often mutative calls require re-binding of all elements. Subsequent calls to the same instance of the component are prone to
StaleElementReferenceException
.- See Also:
EditPermissionsComponent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PermissionsTableComponent.PermissionsTableRowComponent
A sub-component for a single row of permissions table.
-
Constructor Summary
Constructors Constructor Description PermissionsTableComponent(com.atlassian.pageobjects.elements.PageElement container)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PermissionsTableComponent
awaitAllOperationsCompletion(String principal)
Waits for all operations (permissions being granted or revoked) to complete for the given principal.boolean
canChangePermission(String principal, String permission)
Whether the given permission can be changed for the given principal.List<String>
getListedPermissions()
Returns a list of all permissions in this table.List<String>
getPrincipals()
Returns a list of all principals which have permissions granted.PermissionsTableComponent
grantPermission(String principal, String permission)
Grant a permission to the given principal.boolean
hasPermission(String principal, String permission)
Check whether the given principal has a permission.PermissionsTableComponent
removePrincipal(String principal)
Remove a principal and all it's associated permissions from the table.PermissionsTableComponent
revokePermission(String principal, String permission)
Revoke a permission from the given principal.
-
-
-
Method Detail
-
grantPermission
public PermissionsTableComponent grantPermission(String principal, String permission)
Grant a permission to the given principal. To await operation completion, subsequently callawaitAllOperationsCompletion(String)
.
-
revokePermission
public PermissionsTableComponent revokePermission(String principal, String permission)
Revoke a permission from the given principal. To await operation completion, subsequently callawaitAllOperationsCompletion(String)
.
-
awaitAllOperationsCompletion
public PermissionsTableComponent awaitAllOperationsCompletion(String principal)
Waits for all operations (permissions being granted or revoked) to complete for the given principal.
-
canChangePermission
public boolean canChangePermission(String principal, String permission)
Whether the given permission can be changed for the given principal.
-
removePrincipal
public PermissionsTableComponent removePrincipal(String principal)
Remove a principal and all it's associated permissions from the table.
-
hasPermission
public boolean hasPermission(String principal, String permission)
Check whether the given principal has a permission.
-
getPrincipals
public List<String> getPrincipals()
Returns a list of all principals which have permissions granted.
-
getListedPermissions
public List<String> getListedPermissions()
Returns a list of all permissions in this table. Note that some listed permissions may not be editable for various principals or for specific users. For example, anonymous role can't be granted ADMIN permission, and restricted administrator can't grant or revoke global administrative permission.
-
-