// 3. read the schema created above (as admin) - success
schemaTO = schemaService.read(AttributableType.USER, SchemaType.NORMAL, schemaName);
assertNotNull(schemaTO);
// 4. read the schema created above (as user) - success
SchemaService schemaService2 = setupCredentials(schemaService, SchemaService.class,
userTO.getUsername(), "password123");
schemaTO = schemaService2.read(AttributableType.USER, SchemaType.NORMAL, schemaName);
assertNotNull(schemaTO);
// 5. update the schema create above (as user) - failure
try {
schemaService2.update(AttributableType.ROLE, SchemaType.NORMAL, schemaName, schemaTO);
fail("Schemaupdate as user schould not work");
} catch (HttpClientErrorException e) {
assertNotNull(e);
assertEquals(HttpStatus.FORBIDDEN, e.getStatusCode());
} catch (AccessControlException e) {