test_class.declarator: cacheManager
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private CacheManager cacheManager;
test_class.type: CacheManager
test_class.var_name: cacheManager
test_class.declarator: securityHelper
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private SecurityHelper securityHelper;
test_class.type: SecurityHelper
test_class.var_name: securityHelper
test_class.file: herd-code/herd-app/src/test/java/org/finra/herd/app/security/SecurityHelperTest.java
test_class.identifier: SecurityHelperTest
test_class.superclass: extends AbstractAppTest
test_case.body: @Test
      public void testIsGeneratedBy() throws Exception
      {
          assertFalse(securityHelper.isUserGeneratedByClass(null, null));
  
          PreAuthenticatedAuthenticationToken authRequest = new PreAuthenticatedAuthenticationToken(null, null);
          assertFalse(securityHelper.isUserGeneratedByClass(authRequest, null));
      }
test_case.class_method_signature: SecurityHelperTest.testIsGeneratedBy()
test_case.full_signature: @Test public void testIsGeneratedBy()
test_case.identifier: testIsGeneratedBy
test_case.invocations: assertFalse isUserGeneratedByClass assertFalse isUserGeneratedByClass
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIsGeneratedBy()
focal_class.declarator: configurationHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private ConfigurationHelper configurationHelper;
focal_class.type: ConfigurationHelper
focal_class.var_name: configurationHelper
focal_class.declarator: spelExpressionHelper
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private SpelExpressionHelper spelExpressionHelper;
focal_class.type: SpelExpressionHelper
focal_class.var_name: spelExpressionHelper
focal_class.file: herd-code/herd-app/src/main/java/org/finra/herd/app/security/SecurityHelper.java
focal_class.identifier: SecurityHelper
focal_class.class_method_signature: SecurityHelper.getUnrestrictedFunctions()
focal_class.full_signature: public Set<GrantedAuthority> getUnrestrictedFunctions()
focal_class.identifier: getUnrestrictedFunctions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<GrantedAuthority>
focal_class.signature: Set<GrantedAuthority> getUnrestrictedFunctions()
focal_class.class_method_signature: SecurityHelper.isSecurityEnabled(HttpServletRequest request)
focal_class.full_signature: public boolean isSecurityEnabled(HttpServletRequest request)
focal_class.identifier: isSecurityEnabled
focal_class.modifiers: public
focal_class.parameters: (HttpServletRequest request)
focal_class.return: boolean
focal_class.signature: boolean isSecurityEnabled(HttpServletRequest request)
focal_class.class_method_signature: SecurityHelper.isUserGeneratedByClass(Authentication authentication, Class<?> generatedByClass)
focal_class.full_signature: public boolean isUserGeneratedByClass(Authentication authentication, Class<?> generatedByClass)
focal_class.identifier: isUserGeneratedByClass
focal_class.modifiers: public
focal_class.parameters: (Authentication authentication, Class<?> generatedByClass)
focal_class.return: boolean
focal_class.signature: boolean isUserGeneratedByClass(Authentication authentication, Class<?> generatedByClass)
focal_class.class_method_signature: SecurityHelper.mapRolesToFunctions(Collection<String> roles)
focal_class.full_signature: public Set<GrantedAuthority> mapRolesToFunctions(Collection<String> roles)
focal_class.identifier: mapRolesToFunctions
focal_class.modifiers: public
focal_class.parameters: (Collection<String> roles)
focal_class.return: Set<GrantedAuthority>
focal_class.signature: Set<GrantedAuthority> mapRolesToFunctions(Collection<String> roles)
focal_method.body: public boolean isUserGeneratedByClass(Authentication authentication, Class<?> generatedByClass)
      {
          boolean isGeneratedBy = false;
  
          if (authentication != null)
          {
              SecurityUserWrapper securityUserWrapper = (SecurityUserWrapper) authentication.getPrincipal();
              if (securityUserWrapper != null && securityUserWrapper.getApplicationUser().getGeneratedByClass().equals(generatedByClass))
              {
                  isGeneratedBy = true;
              }
          }
          return isGeneratedBy;
      }
focal_method.class_method_signature: SecurityHelper.isUserGeneratedByClass(Authentication authentication, Class<?> generatedByClass)
focal_method.full_signature: public boolean isUserGeneratedByClass(Authentication authentication, Class<?> generatedByClass)
focal_method.identifier: isUserGeneratedByClass
focal_method.invocations: getPrincipal equals getGeneratedByClass getApplicationUser
focal_method.modifiers: public
focal_method.parameters: (Authentication authentication, Class<?> generatedByClass)
focal_method.return: boolean
focal_method.signature: boolean isUserGeneratedByClass(Authentication authentication, Class<?> generatedByClass)