HSAdmin Backend Domains, E-Mail, Datenbanken
peter
2013-05-01 95c92273e94269fffd707557ca33243101530a53
return role "PAC_ADMIN_DW" or "PAC_ADMIN_SW" for webclient
3 files modified
13 ■■■■ changed files
hsarback/src/de/hsadmin/mods/pac/Pac.java 5 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/remote/RoleRemote.java 6 ●●●● patch | view | raw | blame | history
hsarback/test/de/hsadmin/remote/RoleTest.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/Pac.java
@@ -286,4 +286,9 @@
            return multi.getQuantity();
        }
    }
    public boolean isDynamic() {
        String basepacName = getBasepac().getName();
        return PAC_DW.equals(basepacName) || PAC_WEB.equals(basepacName);
    }
}
hsarback/src/de/hsadmin/remote/RoleRemote.java
@@ -34,7 +34,11 @@
                role = "HOSTMASTER";
            }
            if (user.equals(pacName)) {
                role = "PAC_ADMIN";
                if (pac.isDynamic()) {
                    role = "PAC_ADMIN_DW";
                } else {
                    role = "PAC_ADMIN_SW";
                }
            }
            if (role.equals("USER")) {
                GenericModuleImpl module = new GenericModuleImpl(transaction);
hsarback/test/de/hsadmin/remote/RoleTest.java
@@ -45,7 +45,7 @@
            Object[] result = (Object[]) execute;
            assertTrue(result.length == 1);
            String role = (String) ((Map<?, ?>) result[0]).get("role");
            assertEquals("PAC_ADMIN", role);
            assertEquals("PAC_ADMIN_DW", role);
        } catch (XmlRpcException e) {
            fail(e.getMessage());
        }