Compare commits

..

39 Commits

Author SHA1 Message Date
StephanRichter a8e3122152 Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 3m23s
Build Docker Image / Clean-Registry (push) Successful in 4s
2026-05-05 10:01:16 +02:00
StephanRichter dc1a5f4e94 Merge branch 'bugfix/markdown-edit' into dev
Build Docker Image / Docker-Build (push) Successful in 3m0s
Build Docker Image / Clean-Registry (push) Successful in 4s
2026-05-05 08:27:19 +02:00
StephanRichter 80153ada13 Merge branch 'main' into dev
Build Docker Image / Docker-Build (push) Successful in 2m33s
Build Docker Image / Clean-Registry (push) Successful in 4s
2026-05-04 20:58:39 +02:00
StephanRichter 9bf9fba9df Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m35s
Build Docker Image / Clean-Registry (push) Successful in 4s
2026-05-04 15:28:02 +02:00
StephanRichter 01d56ca451 Merge branch 'main' into dev
Build Docker Image / Docker-Build (push) Successful in 2m51s
Build Docker Image / Clean-Registry (push) Successful in 3s
2026-05-04 15:13:49 +02:00
StephanRichter b4af8d1876 Merge branch 'bugfix/empty-markdown' into dev
Build Docker Image / Docker-Build (push) Successful in 2m57s
Build Docker Image / Clean-Registry (push) Successful in 3s
2026-05-04 14:39:04 +02:00
StephanRichter 69c8d0fe9c Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 3m8s
Build Docker Image / Clean-Registry (push) Successful in 4s
2026-05-03 14:02:04 +02:00
StephanRichter bf1a6684a7 Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m36s
Build Docker Image / Clean-Registry (push) Successful in 4s
2026-04-25 20:15:10 +02:00
StephanRichter 5a47ebae2b Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m28s
Build Docker Image / Clean-Registry (push) Successful in 6s
2026-04-25 10:12:09 +02:00
StephanRichter 9d62f15b8f Merge branch 'improvement/autocomplete' into dev 2026-04-24 11:45:39 +02:00
StephanRichter 5524ea7878 Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m31s
Build Docker Image / Clean-Registry (push) Successful in 6s
2026-04-23 23:25:19 +02:00
StephanRichter 3d1850b2d2 Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m32s
Build Docker Image / Clean-Registry (push) Successful in 6s
2026-04-23 20:17:25 +02:00
StephanRichter 02283d57ba Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m1s
Build Docker Image / Clean-Registry (push) Successful in 5s
2026-04-23 16:03:21 +02:00
StephanRichter 1768a48e5e Merge branch 'improvemnet/autocomplete-delay' into dev
Build Docker Image / Docker-Build (push) Successful in 2m27s
Build Docker Image / Clean-Registry (push) Successful in 6s
2026-04-23 15:54:18 +02:00
StephanRichter 1cdf825bcb Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m5s
Build Docker Image / Clean-Registry (push) Successful in 6s
2026-04-23 11:10:21 +02:00
StephanRichter 71c86e512d Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m32s
Build Docker Image / Clean-Registry (push) Successful in 5s
2026-04-23 10:37:56 +02:00
StephanRichter 9d8013bc33 Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m26s
Build Docker Image / Clean-Registry (push) Successful in 6s
2026-04-22 08:38:09 +02:00
StephanRichter 05733d3b7a improved autocomplete
Build Docker Image / Docker-Build (push) Successful in 2m25s
Build Docker Image / Clean-Registry (push) Successful in 6s
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-04-21 09:30:48 +02:00
StephanRichter 71c071bbdd Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m30s
Build Docker Image / Clean-Registry (push) Successful in 6s
2026-04-21 08:27:45 +02:00
StephanRichter 1241fee61d Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m6s
Build Docker Image / Clean-Registry (push) Successful in 5s
2026-04-20 23:04:31 +02:00
StephanRichter d64cb886c9 Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m12s
Build Docker Image / Clean-Registry (push) Successful in 5s
2026-04-20 22:38:58 +02:00
StephanRichter ac8149e6bb Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m1s
Build Docker Image / Clean-Registry (push) Successful in 6s
2026-04-20 22:23:05 +02:00
StephanRichter 493b61465b Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m11s
Build Docker Image / Clean-Registry (push) Successful in 5s
2026-04-20 21:55:23 +02:00
StephanRichter df372e9cfd Merge branch 'accounting' into dev 2026-04-20 08:25:39 +02:00
StephanRichter ff58f3ae82 Merge branch 'bugfix/trim-tags' into dev
Build Docker Image / Docker-Build (push) Successful in 2m19s
Build Docker Image / Clean-Registry (push) Successful in 5s
2026-04-19 11:07:54 +02:00
StephanRichter b71db96b47 improved build workflow
Build Docker Image / Docker-Build (push) Successful in 1m56s
Build Docker Image / Clean-Registry (push) Successful in 5s
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-04-19 10:45:58 +02:00
StephanRichter 02434419f4 Merge branch 'bugfix/trim-tags' into dev
Build Docker Image / Docker-Build (push) Successful in 2m14s
Build Docker Image / Clean-Registry (push) Successful in 6s
2026-04-19 10:40:09 +02:00
StephanRichter bd096dc61f Merge branch 'bugfix/trim-tags' into dev
Build Docker Image / Docker-Build (push) Successful in 2m18s
Build Docker Image / Clean-Registry (push) Successful in -18s
2026-04-18 15:44:37 +02:00
StephanRichter 9f286f3121 Merge branch 'bugfix/trim-tags' into dev
Build Docker Image / Docker-Build (push) Successful in 1m53s
Build Docker Image / Clean-Registry (push) Successful in -18s
2026-04-18 15:28:30 +02:00
StephanRichter 2211f4f39d Merge branch 'bugfix/tag-header' into dev
Build Docker Image / Docker-Build (push) Successful in 3m1s
Build Docker Image / Clean-Registry (push) Successful in -18s
2026-04-18 15:08:02 +02:00
StephanRichter a6b988df3a Merge branch 'accounting' into dev 2026-04-18 15:05:10 +02:00
StephanRichter 1316d3fb1e Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m15s
Build Docker Image / Clean-Registry (push) Successful in -18s
2026-04-15 18:16:37 +02:00
StephanRichter 99fa75a980 Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m17s
Build Docker Image / Clean-Registry (push) Successful in -16s
2026-04-14 23:22:35 +02:00
StephanRichter 6fc590d795 Merge branch 'accounting' into dev 2026-04-14 22:54:44 +02:00
StephanRichter 7afc804586 added menu symbol for accounting
Build Docker Image / Docker-Build (push) Successful in 1m59s
Build Docker Image / Clean-Registry (push) Successful in -17s
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
2026-04-14 22:54:03 +02:00
StephanRichter f40692dd3d Merge branch 'accounting' into dev
Build Docker Image / Docker-Build (push) Successful in 2m23s
Build Docker Image / Clean-Registry (push) Successful in -16s
2026-04-14 22:49:23 +02:00
StephanRichter 1c91699bf5 Merge branch 'module/wiki' into dev
Build Docker Image / Docker-Build (push) Successful in 3m18s
Build Docker Image / Clean-Registry (push) Successful in -15s
2026-04-09 09:12:22 +02:00
StephanRichter 9f5e1e0853 Merge branch 'main' into dev 2026-04-01 18:14:24 +02:00
StephanRichter 55dfea65b0 Merge branch 'bugfix/wiki-css' into dev
Build Docker Image / Docker-Build (push) Successful in 2m34s
Build Docker Image / Clean-Registry (push) Successful in -12s
2026-03-30 23:59:17 +02:00
8 changed files with 14 additions and 37 deletions
+2
View File
@@ -53,8 +53,10 @@ jobs:
run: | run: |
TAGS="$(curl -s -u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASS }}" https://${{ secrets.REGISTRY_PATH }}/v2/umbrella/tags/list | jq -r ".tags[]")" TAGS="$(curl -s -u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASS }}" https://${{ secrets.REGISTRY_PATH }}/v2/umbrella/tags/list | jq -r ".tags[]")"
COUNT=$(echo "$TAGS" | wc -l) COUNT=$(echo "$TAGS" | wc -l)
echo found $COUNT tags: $TAGS
if [ $COUNT -gt 10 ]; then if [ $COUNT -gt 10 ]; then
REMAIN=$((COUNT - 10)) REMAIN=$((COUNT - 10))
echo $REMAIN tags will be kept!
echo "$TAGS" | head -n $REMAIN > /tmp/old_tags echo "$TAGS" | head -n $REMAIN > /tmp/old_tags
else else
echo less than 10 tags, skipping cleanup echo less than 10 tags, skipping cleanup
@@ -3,7 +3,6 @@ package de.srsoftware.umbrella.accounting;
import de.srsoftware.umbrella.core.model.Account; import de.srsoftware.umbrella.core.model.Account;
import de.srsoftware.umbrella.core.model.Transaction; import de.srsoftware.umbrella.core.model.Transaction;
import de.srsoftware.umbrella.core.model.UmbrellaUser;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
@@ -14,8 +13,6 @@ public interface AccountDb {
void dropTransactionTag(long transactionId, String tag); void dropTransactionTag(long transactionId, String tag);
Collection<UmbrellaUser> getMembers(long accountId);
Optional<Transaction> lastTransaction(long accountId, String source, String dest, double amount); Optional<Transaction> lastTransaction(long accountId, String source, String dest, double amount);
Collection<Account> listAccounts(long userId); Collection<Account> listAccounts(long userId);
@@ -7,9 +7,11 @@ import static de.srsoftware.umbrella.core.ConnectionProvider.connect;
import static de.srsoftware.umbrella.core.ModuleRegistry.tagService; import static de.srsoftware.umbrella.core.ModuleRegistry.tagService;
import static de.srsoftware.umbrella.core.ModuleRegistry.userService; import static de.srsoftware.umbrella.core.ModuleRegistry.userService;
import static de.srsoftware.umbrella.core.constants.Path.*; import static de.srsoftware.umbrella.core.constants.Path.*;
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.*; import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.invalidField;
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.missingField;
import static de.srsoftware.umbrella.messagebus.MessageBus.messageBus; import static de.srsoftware.umbrella.messagebus.MessageBus.messageBus;
import static de.srsoftware.umbrella.messagebus.events.Event.EventType.CREATE; import static de.srsoftware.umbrella.messagebus.events.Event.EventType.CREATE;
import static java.lang.System.Logger.Level.WARNING;
import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpExchange;
import de.srsoftware.configuration.Configuration; import de.srsoftware.configuration.Configuration;
@@ -53,7 +55,6 @@ public class AccountingModule extends BaseHandler implements AccountingService {
case TRANSACTION -> { case TRANSACTION -> {
try { try {
var transaction = accountDb.loadTransaction(Long.parseLong(path.pop())); var transaction = accountDb.loadTransaction(Long.parseLong(path.pop()));
if (!accountDb.getMembers(transaction.accountId()).contains(user.get())) throw forbidden("You are not allowed to access account {id}",Field.ID,transaction.accountId());
yield dropTransaction(transaction, user.get(), path, ex); yield dropTransaction(transaction, user.get(), path, ex);
} catch (NumberFormatException ignored) { } catch (NumberFormatException ignored) {
yield super.doDelete(path,ex); yield super.doDelete(path,ex);
@@ -127,7 +128,6 @@ public class AccountingModule extends BaseHandler implements AccountingService {
default -> { default -> {
try { try {
var accountId = Long.parseLong(head); var accountId = Long.parseLong(head);
if (!accountDb.getMembers(accountId).contains(user.get())) throw forbidden("You are not allowed to access account {id}",Field.ID,accountId);
yield postToAccount(accountId,path,user.get(),ex); yield postToAccount(accountId,path,user.get(),ex);
} catch (NumberFormatException ignored) { } catch (NumberFormatException ignored) {
yield super.doPost(path,ex); yield super.doPost(path,ex);
@@ -156,6 +156,7 @@ public class AccountingModule extends BaseHandler implements AccountingService {
} }
private boolean dropTransactionTag(UmbrellaUser user, Transaction transaction, HttpExchange ex) throws IOException { private boolean dropTransactionTag(UmbrellaUser user, Transaction transaction, HttpExchange ex) throws IOException {
LOG.log(WARNING,"Missing permission check in AccountModule.dropTransactionTag!");
var json = json(ex); var json = json(ex);
if (!json.has(Field.TAG)) throw missingField(Field.TAG); if (!json.has(Field.TAG)) throw missingField(Field.TAG);
var tag = json.getString(Field.TAG); var tag = json.getString(Field.TAG);
@@ -185,7 +186,7 @@ public class AccountingModule extends BaseHandler implements AccountingService {
} }
private boolean getAccount(UmbrellaUser user, long accountId, HttpExchange ex) throws IOException { private boolean getAccount(UmbrellaUser user, long accountId, HttpExchange ex) throws IOException {
if (!accountDb.getMembers(accountId).contains(user)) throw forbidden("You are not allowed to access account {id}",Field.ID,accountId); LOG.log(WARNING,"Missing authorization check in AccountingModule.getAccount(…)!");
return sendContent(ex, loadAccount(accountId)); return sendContent(ex, loadAccount(accountId));
} }
@@ -224,7 +225,7 @@ public class AccountingModule extends BaseHandler implements AccountingService {
private boolean patchTransaction(UmbrellaUser user, long transactionId, HttpExchange ex) throws IOException { private boolean patchTransaction(UmbrellaUser user, long transactionId, HttpExchange ex) throws IOException {
var transaction = accountDb.loadTransaction(transactionId); var transaction = accountDb.loadTransaction(transactionId);
if (!accountDb.getMembers(transaction.accountId()).contains(user)) throw forbidden("You are not allowed to access account {id}",Field.ID,transaction.accountId()); LOG.log(WARNING,"Missing permission check in patchTransaction(…)!");
var oldData = transaction.toMap(); var oldData = transaction.toMap();
var json = json(ex); var json = json(ex);
if (json.has(Field.AMOUNT)) transaction.amount(json.getDouble(Field.AMOUNT)); if (json.has(Field.AMOUNT)) transaction.amount(json.getDouble(Field.AMOUNT));
@@ -336,6 +337,7 @@ public class AccountingModule extends BaseHandler implements AccountingService {
} }
private boolean postSearchTags(long accountId, UmbrellaUser user, HttpExchange ex) throws IOException { private boolean postSearchTags(long accountId, UmbrellaUser user, HttpExchange ex) throws IOException {
LOG.log(WARNING,"Missing authorization check in AccountingModule.getAccount(…)!");
var key = body(ex); var key = body(ex);
if (!key.trim().startsWith("{")) { // search tags that contain value of body if (!key.trim().startsWith("{")) { // search tags that contain value of body
var tags = accountDb.searchTagsContaining(key, accountId); var tags = accountDb.searchTagsContaining(key, accountId);
@@ -7,7 +7,6 @@ import static de.srsoftware.tools.jdbc.Condition.*;
import static de.srsoftware.tools.jdbc.Query.*; import static de.srsoftware.tools.jdbc.Query.*;
import static de.srsoftware.tools.jdbc.Query.SelectQuery.ALL; import static de.srsoftware.tools.jdbc.Query.SelectQuery.ALL;
import static de.srsoftware.umbrella.accounting.Constants.*; import static de.srsoftware.umbrella.accounting.Constants.*;
import static de.srsoftware.umbrella.core.ModuleRegistry.userService;
import static de.srsoftware.umbrella.core.constants.Field.*; import static de.srsoftware.umbrella.core.constants.Field.*;
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.*; import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.*;
import static de.srsoftware.umbrella.core.model.Translatable.t; import static de.srsoftware.umbrella.core.model.Translatable.t;
@@ -20,7 +19,6 @@ import de.srsoftware.umbrella.core.constants.Field;
import de.srsoftware.umbrella.core.constants.Text; import de.srsoftware.umbrella.core.constants.Text;
import de.srsoftware.umbrella.core.model.Account; import de.srsoftware.umbrella.core.model.Account;
import de.srsoftware.umbrella.core.model.Transaction; import de.srsoftware.umbrella.core.model.Transaction;
import de.srsoftware.umbrella.core.model.UmbrellaUser;
import java.sql.Connection; import java.sql.Connection;
import java.sql.SQLException; import java.sql.SQLException;
import java.time.ZoneOffset; import java.time.ZoneOffset;
@@ -148,27 +146,6 @@ public class SqliteDb extends BaseDb implements AccountDb {
} }
} }
@Override
public Collection<UmbrellaUser> getMembers(long accountId) {
try {
var userIds = new HashSet<Long>();
var rs = select("DISTINCT "+ SOURCE).from(TABLE_TRANSACTIONS).where(ACCOUNT,equal(accountId)).exec(db);
while (rs.next()) try {
userIds.add(Long.parseLong(rs.getString(1)));
} catch (NumberFormatException ignored) {}
rs.close();
rs = select("DISTINCT "+ DESTINATION).from(TABLE_TRANSACTIONS).where(ACCOUNT,equal(accountId)).exec(db);
while (rs.next()) try {
userIds.add(Long.parseLong(rs.getString(1)));
} catch (NumberFormatException ignored) {}
rs.close();
var us = userService();
return userIds.stream().map(us::loadUser).toList();
} catch (SQLException e) {
throw failedToLoadMembers(Text.ACCOUNT);
}
}
@Override @Override
public Optional<Transaction> lastTransaction(long accountId, String source, String dest, double amount) { public Optional<Transaction> lastTransaction(long accountId, String source, String dest, double amount) {
try { try {
@@ -53,9 +53,10 @@ public class TransactionEvent extends Event<Transaction> {
private Translatable describeDetail(){ private Translatable describeDetail(){
var tr = payload(); var tr = payload();
var head = subject();
var message = "{source}: {source_name}\n{destination}: {dest_name}\n{amount}: {value}\n{purpose}: {purpose_val}\n\n{link}"; var message = "{head}:\n\n{source}: {source_name}\n{destination}: {dest_name}\n{amount}: {value}\n{purpose}: {purpose_val}\n\n{link}";
return t(message,SOURCE,t(Text.SOURCE), "source_name",tr.source(), DESTINATION,t(Text.DESTINATION),"dest_name",tr.destination(), AMOUNT,t(Text.AMOUNT), VALUE,tr.amount(), PURPOSE,t(Text.PURPOSE),"purpose_val",tr.purpose(),"link",link()); return t(message,Field.HEAD, head, SOURCE,t(Text.SOURCE), "source_name",tr.source(), DESTINATION,t(Text.DESTINATION),"dest_name",tr.destination(), AMOUNT,t(Text.AMOUNT), VALUE,tr.amount(), PURPOSE,t(Text.PURPOSE),"purpose_val",tr.purpose(),"link",link());
} }
private Translatable link() { private Translatable link() {
+1 -1
View File
@@ -132,7 +132,7 @@
color: orange; color: orange;
border: 1px solid orange; border: 1px solid orange;
border-radius: 5px; border-radius: 5px;
z-index: 65; z-index: 50;
list-style: none; list-style: none;
padding: 4px; padding: 4px;
margin: 0; margin: 0;
+1 -2
View File
@@ -33,7 +33,6 @@
authors = {...authors, ...data.authors}; authors = {...authors, ...data.authors};
loader.offset += loader.limit; loader.offset += loader.limit;
loader.active = false; loader.active = false;
console.log({authors});
yikes(); yikes();
if (Object.keys(data.notes).length) onscroll(null); // when notes were received, check whether they fill up the page if (Object.keys(data.notes).length) onscroll(null); // when notes were received, check whether they fill up the page
@@ -79,4 +78,4 @@
</svelte:head> </svelte:head>
<svelte:window {onscroll} /> <svelte:window {onscroll} />
<List {notes} {authors} /> <List {notes} />
-1
View File
@@ -64,7 +64,6 @@
<legend class="entity" onclick={() => goToEntity(note)}>{title(note)}</legend> <legend class="entity" onclick={() => goToEntity(note)}>{title(note)}</legend>
{/if} {/if}
<legend class="time"> <legend class="time">
{#if !module} {authors[note.user_id].name} {/if}
{note.timestamp.replace('T',' ')} {note.timestamp.replace('T',' ')}
{#if user.id == note.user_id} {#if user.id == note.user_id}
<button class="symbol" onclick={() => drop(note.id)}></button> <button class="symbol" onclick={() => drop(note.id)}></button>