@Test public void test_containsAdminPolicies() throws Exception { List<String> policies1= new ArrayList<>(); List<String> policies2= new ArrayList<>(); policies1.add("default"); policies1.add("r_users_s1"); policies2.add("r_users_s1"); policies2.add("w_users_s1"); policies2.add("w_users_s1"); boolean actual = authorizationUtils.containsAdminPolicies(policies1, policies2); assertTrue(actual); }
public boolean containsAdminPolicies(List<String> policies, List<String> adminPolicies) { List<String> commonPolicies = (List<String>) CollectionUtils.intersection(policies, adminPolicies); return commonPolicies.size() > 0 ? true: false; }
AuthorizationUtils { public boolean containsAdminPolicies(List<String> policies, List<String> adminPolicies) { List<String> commonPolicies = (List<String>) CollectionUtils.intersection(policies, adminPolicies); return commonPolicies.size() > 0 ? true: false; } }
AuthorizationUtils { public boolean containsAdminPolicies(List<String> policies, List<String> adminPolicies) { List<String> commonPolicies = (List<String>) CollectionUtils.intersection(policies, adminPolicies); return commonPolicies.size() > 0 ? true: false; } AuthorizationUtils(); }
AuthorizationUtils { public boolean containsAdminPolicies(List<String> policies, List<String> adminPolicies) { List<String> commonPolicies = (List<String>) CollectionUtils.intersection(policies, adminPolicies); return commonPolicies.size() > 0 ? true: false; } AuthorizationUtils(); boolean isAuthorized(UserDetails userDetails, Safe safeMetaData, String[] latestPolicies, ArrayList<String> policiesTobeChecked, boolean forceCapabilityCheck); boolean containsAdminPolicies(List<String> policies, List<String> adminPolicies); boolean isAuthorizedCert(UserDetails userDetails, SSLCertificateMetadataDetails sslMetaData, String[] latestPolicies, ArrayList<String> policiesTobeChecked, boolean forceCapabilityCheck); }
AuthorizationUtils { public boolean containsAdminPolicies(List<String> policies, List<String> adminPolicies) { List<String> commonPolicies = (List<String>) CollectionUtils.intersection(policies, adminPolicies); return commonPolicies.size() > 0 ? true: false; } AuthorizationUtils(); boolean isAuthorized(UserDetails userDetails, Safe safeMetaData, String[] latestPolicies, ArrayList<String> policiesTobeChecked, boolean forceCapabilityCheck); boolean containsAdminPolicies(List<String> policies, List<String> adminPolicies); boolean isAuthorizedCert(UserDetails userDetails, SSLCertificateMetadataDetails sslMetaData, String[] latestPolicies, ArrayList<String> policiesTobeChecked, boolean forceCapabilityCheck);  }