Class GlobalPermissionControl

    • Constructor Detail

      • GlobalPermissionControl

        public GlobalPermissionControl​(@NotNull
                                       @NotNull BambooEnvironmentData environmentData)
    • Method Detail

      • setAnonymousAccess

        public void setAnonymousAccess​(boolean isEnabled)
        Updates the Anonymous Access global permission in the Bamboo instance.
        Parameters:
        isEnabled - true if anonymous access is to be allowed, false otherwise
      • setUserPermissions

        public void setUserPermissions​(@NotNull
                                       @NotNull TestUser testUser,
                                       @NotNull
                                       @NotNull Collection<BambooPermission> permissions)
                                throws Exception
        Set global permissions for a user. This method can be used to revoke permissions.
        Throws:
        Exception
      • setLoggedUserPermission

        public void setLoggedUserPermission​(Collection<BambooPermission> permissions)
        Updates the Logged in users global permissions in the Bamboo instance.
        Parameters:
        permissions - list of permissions to be granted
      • setLoggedUserPermission

        public void setLoggedUserPermission​(BambooPermission... permissions)
        Updates the Logged in users global permissions in the Bamboo instance.
        Parameters:
        permissions - list of permissions to be granted
      • setLoggedUserPermission

        public void setLoggedUserPermission​(Stream<BambooPermission> permissions)
        Updates the Logged in users global permissions in the Bamboo instance.
      • setGroupPermissions

        public void setGroupPermissions​(@NotNull
                                        @NotNull TestGroup testGroup,
                                        @NotNull
                                        @NotNull Collection<BambooPermission> permissions)
                                 throws Exception
        Set global permissions for a user group. This method can be used to revoke permissions.
        Throws:
        Exception
      • getRolePermissions

        @NotNull
        public @NotNull List<BambooPermission> getRolePermissions​(@NotNull
                                                                  @NotNull BambooRole role)
        Get current global role permissions.
      • setRolePermissions

        public void setRolePermissions​(@NotNull
                                       @NotNull BambooRole role,
                                       @NotNull
                                       @NotNull Collection<BambooPermission> permissions)
        Set global role permissions. This method can be used to revoke permissions.