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 of EditPermissionsComponent, 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:
  • Constructor Details

    • PermissionsTableComponent

      public PermissionsTableComponent(com.atlassian.pageobjects.elements.PageElement container)
  • Method Details

    • grantPermission

      public PermissionsTableComponent grantPermission(String principal, String permission)
      Grant a permission to the given principal. To await operation completion, subsequently call awaitAllOperationsCompletion(String).
    • revokePermission

      public PermissionsTableComponent revokePermission(String principal, String permission)
      Revoke a permission from the given principal. To await operation completion, subsequently call awaitAllOperationsCompletion(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.