@Test public void testAdminRules() { GSUser user = createUser("auth00"); ruleAdminService.insert(new Rule(10, user.getName(), null, null, null, "s1", "r1", "w1", "l1", GrantType.ALLOW)); RuleFilter filter = new RuleFilter(SpecialFilterType.ANY, true); filter.setWorkspace("w1"); AccessInfo accessInfo = ruleReaderService.getAccessInfo(filter); assertEquals(GrantType.ALLOW, accessInfo.getGrant()); assertFalse(accessInfo.getAdminRights()); adminruleAdminService.insert(new AdminRule(20, user.getName(), null, null, null, null, AdminGrantType.USER)); accessInfo = ruleReaderService.getAccessInfo(filter); assertEquals(GrantType.ALLOW, accessInfo.getGrant()); assertFalse(accessInfo.getAdminRights()); adminruleAdminService.insert(new AdminRule(10, user.getName(), null, null, null, "w1", AdminGrantType.ADMIN)); accessInfo = ruleReaderService.getAccessInfo(filter); assertEquals(GrantType.ALLOW, accessInfo.getGrant()); assertTrue(accessInfo.getAdminRights()); }
@Override @Deprecated public AccessInfo getAccessInfo(String userName, String roleName, String instanceName, String sourceAddress, String service, String request, String workspace, String layer) { return getAccessInfo(new RuleFilter(userName, roleName, instanceName, sourceAddress, service, request, workspace, layer)); }
RuleReaderServiceImpl implements RuleReaderService { @Override @Deprecated public AccessInfo getAccessInfo(String userName, String roleName, String instanceName, String sourceAddress, String service, String request, String workspace, String layer) { return getAccessInfo(new RuleFilter(userName, roleName, instanceName, sourceAddress, service, request, workspace, layer)); } }
RuleReaderServiceImpl implements RuleReaderService { @Override @Deprecated public AccessInfo getAccessInfo(String userName, String roleName, String instanceName, String sourceAddress, String service, String request, String workspace, String layer) { return getAccessInfo(new RuleFilter(userName, roleName, instanceName, sourceAddress, service, request, workspace, layer)); }  }
RuleReaderServiceImpl implements RuleReaderService { @Override @Deprecated public AccessInfo getAccessInfo(String userName, String roleName, String instanceName, String sourceAddress, String service, String request, String workspace, String layer) { return getAccessInfo(new RuleFilter(userName, roleName, instanceName, sourceAddress, service, request, workspace, layer)); }  @Override @Deprecated List<ShortRule> getMatchingRules(
                    String userName, String profileName, String instanceName,
                    String sourceAddress,
                    String service, String request,
                    String workspace, String layer); @Override List<ShortRule> getMatchingRules(RuleFilter filter); @Override @Deprecated AccessInfo getAccessInfo(String userName, String roleName, String instanceName,
            String sourceAddress,
            String service, String request,
            String workspace, String layer); @Override AccessInfo getAccessInfo(RuleFilter filter); @Override AccessInfo getAdminAuthorization(RuleFilter filter); @Override @Deprecated AuthUser authorize(String username, String password); void setRuleDAO(RuleDAO ruleDAO); void setAdminRuleDAO(AdminRuleDAO adminRuleDAO); void setLayerDetailsDAO(LayerDetailsDAO detailsDAO); void setUserResolver(UserResolver userResolver); void setAuthorizationService(AuthorizationService authorizationService); }
RuleReaderServiceImpl implements RuleReaderService { @Override @Deprecated public AccessInfo getAccessInfo(String userName, String roleName, String instanceName, String sourceAddress, String service, String request, String workspace, String layer) { return getAccessInfo(new RuleFilter(userName, roleName, instanceName, sourceAddress, service, request, workspace, layer)); }  @Override @Deprecated List<ShortRule> getMatchingRules(
                    String userName, String profileName, String instanceName,
                    String sourceAddress,
                    String service, String request,
                    String workspace, String layer); @Override List<ShortRule> getMatchingRules(RuleFilter filter); @Override @Deprecated AccessInfo getAccessInfo(String userName, String roleName, String instanceName,
            String sourceAddress,
            String service, String request,
            String workspace, String layer); @Override AccessInfo getAccessInfo(RuleFilter filter); @Override AccessInfo getAdminAuthorization(RuleFilter filter); @Override @Deprecated AuthUser authorize(String username, String password); void setRuleDAO(RuleDAO ruleDAO); void setAdminRuleDAO(AdminRuleDAO adminRuleDAO); void setLayerDetailsDAO(LayerDetailsDAO detailsDAO); void setUserResolver(UserResolver userResolver); void setAuthorizationService(AuthorizationService authorizationService);  }