preparing to show pages to guests

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-09-19 09:22:44 +02:00
parent 026e098314
commit 93124a9a8c
2 changed files with 12 additions and 6 deletions

View File

@@ -5,12 +5,17 @@ package de.srsoftware.umbrella.core.model;
import static de.srsoftware.umbrella.core.Constants.*;
import de.srsoftware.tools.Mappable;
import java.util.HashMap;
import java.util.Map;
public record Member(UmbrellaUser user, Permission permission) implements Mappable {
@Override
public Map<String, Object> toMap() {
return Map.of(USER,user.toMap(),PERMISSION,permission.toMap());
var map = new HashMap<String,Object>();
map.put(USER,user == null ? null : user.toMap());
map.put(PERMISSION,permission.toMap());
return map;
}
public boolean mayWrite() {

View File

@@ -100,11 +100,12 @@
</Router>
{:else}
<Router>
<Route path="/user/reset/pw" component={ResetPw} />
<Route path="/oidc_callback" component={Callback} />
<Route>
<Login />
</Route>
<Route path="/user/reset/pw" component={ResetPw} />
<Route path="/oidc_callback" component={Callback} />
<Route path="/wiki/:key/view" component={WikiPage} />
<Route>
<Login />
</Route>
</Router>
{/if}
<Footer />