Portiere PHP-Cronjobs auf Spring-Tasks und ergänze Legacy-Tests
Migriert die weiterhin benötigten Zeitaufgaben einschließlich SOAP-Importen, Betriebsstatus und Wiederanlaufkontrolle. Aktiviert 115 native Spring-Tasks im Docker-Image ohne Cron-Daemon oder PHP und dokumentiert die entfallenen HHA-Aufrufe. Ergänzt PHP-/UI-Testwerkzeuge und aktualisiert den Projektstand auf Version 0.2.0.
This commit is contained in:
1 parent
781a2b82dc
commit
9de2358480
57 files changed
+3251
-7
No files matched your search
@@ -34,6 +34,17 @@ class ApiSecurityTest {
|
||||
@MockitoBean DatabaseService database;
|
||||
@MockitoBean LoginActivity loginActivity;
|
||||
|
||||
@Test void cronReviewAndStatusRequireSessionRightsAndCsrf() throws Exception {
|
||||
mvc.perform(get("/api/administration/cron/database-status?month=2026-10")).andExpect(status().isUnauthorized());
|
||||
var session=authenticated("existing-user","existing-password");
|
||||
mvc.perform(post("/api/administration/cron/mysql-status/review").session(session).contentType("application/json").content("{\"reviewed\":true}")).andExpect(status().isForbidden());
|
||||
when(database.queryForList(eq(LegacyAuthenticationProvider.AUTH_SQL),eq("no-cron-rights"),any(),any())).thenReturn(List.of(Map.of("usr_id",11,"emp_id",12,"hq_id",7,"usr_account","no-cron-rights","emp_rights","00000000")));
|
||||
var denied=authenticated("no-cron-rights","pw");var token=csrf(denied);
|
||||
mvc.perform(get("/api/administration/cron/database-status?month=2026-10").session(denied)).andExpect(status().isForbidden());
|
||||
mvc.perform(post("/api/administration/cron/mysql-status/review").session(denied).header(token.header(),token.token()).contentType("application/json").content("{\"reviewed\":true}")).andExpect(status().isForbidden());
|
||||
verify(database,never()).cronOperation(anyString(),any());
|
||||
}
|
||||
|
||||
@Test void customerAddressPropagationRequiresSessionRightsAndCsrf() throws Exception {
|
||||
String base="/api/master/customers/1/address-propagation";
|
||||
var anon=csrf(null);var session=authenticated("existing-user","existing-password");
|
||||
|
||||
Reference in new issue
Block a user