Class ImpersonationHelper

java.lang.Object
com.atlassian.bamboo.security.ImpersonationHelper

public class ImpersonationHelper extends Object
  • Method Details

    • runWithSystemAuthority

      public static <E1 extends Throwable, E2 extends Throwable, E3 extends Throwable> void runWithSystemAuthority(@NotNull BambooRunnables.ThrowingX<E1,E2,E3> runnable) throws E2, E1, E3
      Throws:
      E2
      E1
      E3
    • runWith

      public static <E1 extends Throwable, E2 extends Throwable, E3 extends Throwable> void runWith(@NotNull @NotNull org.acegisecurity.Authentication authentication, @NotNull BambooRunnables.ThrowingX<E1,E2,E3> runnable) throws E2, E1, E3
      Throws:
      E2
      E1
      E3
    • callWithSystemAuthority

      public static <T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable> T callWithSystemAuthority(@NotNull BambooCallables.ThrowingX<T,E1,E2,E3> callable) throws E2, E1, E3
      Throws:
      E2
      E1
      E3
    • callWith

      public static <T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable> T callWith(@NotNull @NotNull org.acegisecurity.Authentication authentication, @NotNull BambooCallables.ThrowingX<T,E1,E2,E3> callable) throws E2, E1, E3
      Throws:
      E2
      E1
      E3
    • newAuthenticationForCurrentThread

      public static void newAuthenticationForCurrentThread(org.acegisecurity.Authentication authentication)
    • makeRunnableWithSystemAuthority

      public static Runnable makeRunnableWithSystemAuthority(Runnable runnable)
    • escalateCurrentThreadToSystemAuthority

      public static void escalateCurrentThreadToSystemAuthority()
    • runAs

      public static <E1 extends Throwable, E2 extends Throwable, E3 extends Throwable> void runAs(@NotNull @NotNull BambooUser user, @NotNull BambooRunnables.ThrowingX<E1,E2,E3> runnable) throws E2, E1, E3
      Throws:
      E2
      E1
      E3