test_class.declarator: impersonator
test_class.modifier: private
test_class.original_string: private User impersonator;
test_class.type: User
test_class.var_name: impersonator
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/ImpersonationImplTest.java
test_class.identifier: ImpersonationImplTest
test_class.superclass: extends ImpersonationImplEmptyTest
test_case.body: @Test
      public void testRevoke() throws Exception {
          assertTrue(impersonation.revokeImpersonation(impersonator.getPrincipal()));
      }
test_case.class_method_signature: ImpersonationImplTest.testRevoke()
test_case.full_signature: @Test public void testRevoke()
test_case.identifier: testRevoke
test_case.invocations: assertTrue revokeImpersonation getPrincipal
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRevoke()
focal_class.declarator: log = LoggerFactory.getLogger(ImpersonationImpl.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(ImpersonationImpl.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: user
focal_class.modifier: private final
focal_class.original_string: private final UserImpl user;
focal_class.type: UserImpl
focal_class.var_name: user
focal_class.declarator: principalManager
focal_class.modifier: private final
focal_class.original_string: private final PrincipalManager principalManager;
focal_class.type: PrincipalManager
focal_class.var_name: principalManager
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/ImpersonationImpl.java
focal_class.identifier: ImpersonationImpl
focal_class.interfaces: implements Impersonation, UserConstants
focal_class.class_method_signature: ImpersonationImpl.ImpersonationImpl(@NotNull UserImpl user)
focal_class.full_signature:   ImpersonationImpl(@NotNull UserImpl user)
focal_class.identifier: ImpersonationImpl
focal_class.parameters: (@NotNull UserImpl user)
focal_class.signature:  ImpersonationImpl(@NotNull UserImpl user)
focal_class.class_method_signature: ImpersonationImpl.getImpersonators()
focal_class.full_signature: @NotNull @Override public PrincipalIterator getImpersonators()
focal_class.identifier: getImpersonators
focal_class.modifiers: @NotNull @Override public
focal_class.parameters: ()
focal_class.return: PrincipalIterator
focal_class.signature: PrincipalIterator getImpersonators()
focal_class.class_method_signature: ImpersonationImpl.grantImpersonation(@NotNull Principal principal)
focal_class.full_signature: @Override public boolean grantImpersonation(@NotNull Principal principal)
focal_class.identifier: grantImpersonation
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Principal principal)
focal_class.return: boolean
focal_class.signature: boolean grantImpersonation(@NotNull Principal principal)
focal_class.class_method_signature: ImpersonationImpl.revokeImpersonation(@NotNull Principal principal)
focal_class.full_signature: @Override public boolean revokeImpersonation(@NotNull Principal principal)
focal_class.identifier: revokeImpersonation
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Principal principal)
focal_class.return: boolean
focal_class.signature: boolean revokeImpersonation(@NotNull Principal principal)
focal_class.class_method_signature: ImpersonationImpl.allows(@NotNull Subject subject)
focal_class.full_signature: @Override public boolean allows(@NotNull Subject subject)
focal_class.identifier: allows
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull Subject subject)
focal_class.return: boolean
focal_class.signature: boolean allows(@NotNull Subject subject)
focal_class.class_method_signature: ImpersonationImpl.getImpersonatorNames()
focal_class.full_signature: @NotNull private Set<String> getImpersonatorNames()
focal_class.identifier: getImpersonatorNames
focal_class.modifiers: @NotNull private
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> getImpersonatorNames()
focal_class.class_method_signature: ImpersonationImpl.getImpersonatorNames(@NotNull Tree userTree)
focal_class.full_signature: @NotNull private Set<String> getImpersonatorNames(@NotNull Tree userTree)
focal_class.identifier: getImpersonatorNames
focal_class.modifiers: @NotNull private
focal_class.parameters: (@NotNull Tree userTree)
focal_class.return: Set<String>
focal_class.signature: Set<String> getImpersonatorNames(@NotNull Tree userTree)
focal_class.class_method_signature: ImpersonationImpl.updateImpersonatorNames(@NotNull Tree userTree, @NotNull Set<String> principalNames)
focal_class.full_signature: private void updateImpersonatorNames(@NotNull Tree userTree, @NotNull Set<String> principalNames)
focal_class.identifier: updateImpersonatorNames
focal_class.modifiers: private
focal_class.parameters: (@NotNull Tree userTree, @NotNull Set<String> principalNames)
focal_class.return: void
focal_class.signature: void updateImpersonatorNames(@NotNull Tree userTree, @NotNull Set<String> principalNames)
focal_class.class_method_signature: ImpersonationImpl.isAdmin(@NotNull Principal principal)
focal_class.full_signature: private boolean isAdmin(@NotNull Principal principal)
focal_class.identifier: isAdmin
focal_class.modifiers: private
focal_class.parameters: (@NotNull Principal principal)
focal_class.return: boolean
focal_class.signature: boolean isAdmin(@NotNull Principal principal)
focal_class.class_method_signature: ImpersonationImpl.isValidPrincipal(@NotNull Principal principal)
focal_class.full_signature: private boolean isValidPrincipal(@NotNull Principal principal)
focal_class.identifier: isValidPrincipal
focal_class.modifiers: private
focal_class.parameters: (@NotNull Principal principal)
focal_class.return: boolean
focal_class.signature: boolean isValidPrincipal(@NotNull Principal principal)
focal_method.body: @Override
      public boolean revokeImpersonation(@NotNull Principal principal) throws RepositoryException {
          String pName = principal.getName();
  
          user.getUserManager().onImpersonation(user, principal, false);
  
          Tree userTree = user.getTree();
          Set<String> impersonators = getImpersonatorNames(userTree);
          if (impersonators.remove(pName)) {
              updateImpersonatorNames(userTree, impersonators);
              return true;
          } else {
              return false;
          }
      }
focal_method.class_method_signature: ImpersonationImpl.revokeImpersonation(@NotNull Principal principal)
focal_method.full_signature: @Override public boolean revokeImpersonation(@NotNull Principal principal)
focal_method.identifier: revokeImpersonation
focal_method.invocations: getName onImpersonation getUserManager getTree getImpersonatorNames remove updateImpersonatorNames
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull Principal principal)
focal_method.return: boolean
focal_method.signature: boolean revokeImpersonation(@NotNull Principal principal)